Skip to content

Commit

Permalink
🔨 Refactor Sample app package name to 'me.panpf.sketch.sample'
Browse files Browse the repository at this point in the history
  • Loading branch information
Flyge committed Nov 5, 2017
1 parent 385b77b commit d2c91a5
Show file tree
Hide file tree
Showing 117 changed files with 436 additions and 444 deletions.
1 change: 1 addition & 0 deletions docs/logs/log_2.6.0_p1.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

sample app:
* :bug: 修复 UNSPLASH 页面没有加载完数据就切换到别的页面时崩溃的 BUG
* :hammer: 重构包名为 me.panpf.sketch.sample

待办:
* 重写 block_display.md ,然后在 zoom.md 中引用
2 changes: 1 addition & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android {
buildToolsVersion "${BUILD_TOOLS_VERSION}"

defaultConfig {
applicationId "me.xiaopan.sketchsample"
applicationId "me.panpf.sketch.sample"
minSdkVersion MIN_SDK_VERSION.toInteger()
targetSdkVersion TARGET_SDK_VERSION.toInteger()
versionCode VERSION_CODE.toInteger()
Expand Down
7 changes: 2 additions & 5 deletions sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="me.xiaopan.sketchsample">

<uses-sdk tools:overrideLibrary="wseemann.media" />
package="me.panpf.sketch.sample">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Expand Down Expand Up @@ -37,7 +34,7 @@
android:process=":notification" />

<meta-data
android:name="me.xiaopan.sketchsample.SampleSketchInitializer"
android:name="me.panpf.sketch.sample.SampleSketchInitializer"
android:value="SKETCH_INITIALIZER" />

<meta-data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.xiaopan.sketchsample
package me.panpf.sketch.sample

import android.content.Context
import android.content.pm.PackageManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package me.xiaopan.sketchsample
package me.panpf.sketch.sample

import android.graphics.Color
import android.os.Build
Expand All @@ -25,8 +25,7 @@ import android.view.MenuItem
import android.view.View
import android.view.ViewGroup
import android.view.WindowManager
import me.xiaopan.sketchsample.util.DataTransferStation
import me.xiaopan.ssvt.bindOptionalView
import me.panpf.sketch.sample.util.DataTransferStation

abstract class BaseActivity : AppCompatActivity() {
val toolbar: Toolbar? by bindOptionalView(R.id.toolbar)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package me.xiaopan.sketchsample
package me.panpf.sketch.sample

import android.os.Bundle
import android.support.v4.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import me.xiaopan.sketchsample.util.DataTransferStation
import me.panpf.sketch.sample.util.DataTransferStation

open class BaseFragment : Fragment() {
val dataTransferHelper = DataTransferStation.PageHelper(this)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.xiaopan.sketchsample
package me.panpf.sketch.sample

import java.lang.annotation.Inherited

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.xiaopan.ssvt
package me.panpf.sketch.sample

import android.app.Activity
import android.app.Dialog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package me.xiaopan.sketchsample
package me.panpf.sketch.sample

import android.content.Context
import android.graphics.Bitmap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package me.xiaopan.sketchsample
package me.panpf.sketch.sample

import android.app.Service
import android.content.Intent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package me.xiaopan.sketchsample
package me.panpf.sketch.sample

import android.app.Application
import android.os.Build
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.xiaopan.sketchsample
package me.panpf.sketch.sample

import android.content.Context
import android.graphics.Bitmap
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.xiaopan.sketchsample
package me.panpf.sketch.sample

import android.content.Context
import android.os.Build
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package me.xiaopan.sketchsample
package me.panpf.sketch.sample

import android.content.Context
import me.xiaopan.sketch.Configuration
import me.xiaopan.sketch.Initializer
import me.xiaopan.sketch.SLog
import me.xiaopan.sketchsample.event.AppConfigChangedEvent
import me.xiaopan.sketchsample.util.AppConfig
import me.xiaopan.sketchsample.util.XpkIconUriModel
import me.panpf.sketch.sample.event.AppConfigChangedEvent
import me.panpf.sketch.sample.util.AppConfig
import me.panpf.sketch.sample.util.XpkIconUriModel
import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,18 @@
* limitations under the License.
*/

package me.xiaopan.sketchsample.activity
package me.panpf.sketch.sample.activity

import android.app.Activity
import android.content.Intent
import android.os.Build
import android.os.Bundle
import android.view.MotionEvent
import android.view.View
import me.xiaopan.sketchsample.BaseActivity
import me.xiaopan.sketchsample.BindContentView
import me.xiaopan.sketchsample.ImageOptions
import me.xiaopan.sketchsample.R
import me.xiaopan.sketchsample.fragment.ImageDetailFragment
import me.xiaopan.sketchsample.util.DeviceUtils
import me.xiaopan.sketchsample.widget.SampleImageView
import me.xiaopan.ssvt.bindView
import me.panpf.sketch.sample.*
import me.panpf.sketch.sample.fragment.ImageDetailFragment
import me.panpf.sketch.sample.util.DeviceUtils
import me.panpf.sketch.sample.widget.SampleImageView

@BindContentView(R.layout.activity_only_fragment)
class ImageDetailActivity : BaseActivity(), PageBackgApplyCallback {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package me.xiaopan.sketchsample.activity
package me.panpf.sketch.sample.activity

import android.annotation.SuppressLint
import android.content.Context
Expand All @@ -35,26 +35,25 @@ import android.util.TypedValue
import android.view.*
import android.widget.TextView
import android.widget.Toast
import me.panpf.sketch.sample.*
import me.panpf.sketch.sample.adapter.itemfactory.CheckMenuItemFactory
import me.panpf.sketch.sample.adapter.itemfactory.InfoMenuItemFactory
import me.panpf.sketch.sample.adapter.itemfactory.MenuTitleItemFactory
import me.panpf.sketch.sample.adapter.itemfactory.PageMenuItemFactory
import me.panpf.sketch.sample.bean.CheckMenu
import me.panpf.sketch.sample.bean.InfoMenu
import me.panpf.sketch.sample.event.CacheCleanEvent
import me.panpf.sketch.sample.fragment.*
import me.panpf.sketch.sample.util.AnimationUtils
import me.panpf.sketch.sample.util.AppConfig
import me.panpf.sketch.sample.util.DeviceUtils
import me.panpf.sketch.sample.util.ImageOrientationCorrectTestFileGenerator
import me.panpf.sketch.sample.widget.SampleImageView
import me.xiaopan.assemblyadapter.AssemblyRecyclerAdapter
import me.xiaopan.psts.PagerSlidingTabStrip
import me.xiaopan.sketch.SLog
import me.xiaopan.sketch.Sketch
import me.xiaopan.sketch.util.SketchUtils
import me.xiaopan.sketchsample.*
import me.xiaopan.sketchsample.adapter.itemfactory.CheckMenuItemFactory
import me.xiaopan.sketchsample.adapter.itemfactory.InfoMenuItemFactory
import me.xiaopan.sketchsample.adapter.itemfactory.MenuTitleItemFactory
import me.xiaopan.sketchsample.adapter.itemfactory.PageMenuItemFactory
import me.xiaopan.sketchsample.bean.CheckMenu
import me.xiaopan.sketchsample.bean.InfoMenu
import me.xiaopan.sketchsample.event.CacheCleanEvent
import me.xiaopan.sketchsample.fragment.*
import me.xiaopan.sketchsample.util.AnimationUtils
import me.xiaopan.sketchsample.util.AppConfig
import me.xiaopan.sketchsample.util.DeviceUtils
import me.xiaopan.sketchsample.util.ImageOrientationCorrectTestFileGenerator
import me.xiaopan.sketchsample.widget.SampleImageView
import me.xiaopan.ssvt.bindView
import org.greenrobot.eventbus.EventBus
import java.lang.ref.WeakReference
import java.util.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.xiaopan.sketchsample.activity
package me.panpf.sketch.sample.activity

interface PageBackgApplyCallback {
fun onApplyBackground(imageUri: String?)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.xiaopan.sketchsample.adapter.itemfactory
package me.panpf.sketch.sample.adapter.itemfactory

import android.content.Context
import android.view.ViewGroup
Expand All @@ -7,12 +7,12 @@ import me.xiaopan.assemblyadapter.AssemblyRecyclerItem
import me.xiaopan.assemblyadapter.AssemblyRecyclerItemFactory
import me.xiaopan.sketch.uri.ApkIconUriModel
import me.xiaopan.sketch.uri.AppIconUriModel
import me.xiaopan.sketchsample.ImageOptions
import me.xiaopan.sketchsample.R
import me.xiaopan.sketchsample.bean.AppInfo
import me.xiaopan.sketchsample.util.XpkIconUriModel
import me.xiaopan.sketchsample.widget.SampleImageView
import me.xiaopan.ssvt.bindView
import me.panpf.sketch.sample.ImageOptions
import me.panpf.sketch.sample.R
import me.panpf.sketch.sample.bean.AppInfo
import me.panpf.sketch.sample.bindView
import me.panpf.sketch.sample.util.XpkIconUriModel
import me.panpf.sketch.sample.widget.SampleImageView

class AppItemFactory(private val listener: AppItemListener?) : AssemblyRecyclerItemFactory<AppItemFactory.AppItem>() {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package me.xiaopan.sketchsample.adapter.itemfactory
package me.panpf.sketch.sample.adapter.itemfactory

import android.content.Context
import android.view.ViewGroup
import android.widget.TextView
import me.xiaopan.assemblyadapter.AssemblyRecyclerItem
import me.xiaopan.assemblyadapter.AssemblyRecyclerItemFactory
import me.xiaopan.sketchsample.R
import me.xiaopan.ssvt.bindView
import me.panpf.sketch.sample.R
import me.panpf.sketch.sample.bindView

class AppListHeaderItemFactory : AssemblyRecyclerItemFactory<AppListHeaderItemFactory.AppListHeaderItem>() {
override fun isTarget(o: Any): Boolean {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.xiaopan.sketchsample.adapter.itemfactory
package me.panpf.sketch.sample.adapter.itemfactory

import android.content.Context
import android.view.View
Expand All @@ -7,9 +7,9 @@ import android.widget.ProgressBar
import android.widget.TextView
import me.xiaopan.assemblyadapter.AssemblyRecyclerItem
import me.xiaopan.assemblyadapter.AssemblyRecyclerItemFactory
import me.xiaopan.sketchsample.R
import me.xiaopan.sketchsample.bean.AppScanning
import me.xiaopan.ssvt.bindView
import me.panpf.sketch.sample.R
import me.panpf.sketch.sample.bean.AppScanning
import me.panpf.sketch.sample.bindView

class AppScanningItemFactory : AssemblyRecyclerItemFactory<AppScanningItemFactory.AppListHeaderItem>() {
override fun isTarget(o: Any): Boolean {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package me.xiaopan.sketchsample.adapter.itemfactory
package me.panpf.sketch.sample.adapter.itemfactory

import android.content.Context
import android.view.ViewGroup
import android.widget.CheckBox
import android.widget.TextView
import me.xiaopan.assemblyadapter.AssemblyRecyclerItem
import me.xiaopan.assemblyadapter.AssemblyRecyclerItemFactory
import me.xiaopan.sketchsample.R
import me.xiaopan.sketchsample.bean.CheckMenu
import me.xiaopan.ssvt.bindView
import me.panpf.sketch.sample.R
import me.panpf.sketch.sample.bean.CheckMenu
import me.panpf.sketch.sample.bindView

class CheckMenuItemFactory : AssemblyRecyclerItemFactory<CheckMenuItemFactory.CheckMenuItem>() {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package me.xiaopan.sketchsample.adapter.itemfactory
package me.panpf.sketch.sample.adapter.itemfactory

import android.content.Context
import android.support.v4.app.Fragment

import me.xiaopan.assemblyadapter.AssemblyFragmentItemFactory
import me.xiaopan.sketchsample.bean.Image
import me.xiaopan.sketchsample.fragment.ImageFragment
import me.xiaopan.sketchsample.util.AppConfig
import me.panpf.sketch.sample.bean.Image
import me.panpf.sketch.sample.fragment.ImageFragment
import me.panpf.sketch.sample.util.AppConfig

class ImageFragmentItemFactory(private val context: Context, private var loadingImageOptionsId: String?) : AssemblyFragmentItemFactory<Image>() {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package me.xiaopan.sketchsample.adapter.itemfactory
package me.panpf.sketch.sample.adapter.itemfactory

import android.content.Context
import android.view.ViewGroup
import android.widget.TextView
import me.xiaopan.assemblyadapter.AssemblyRecyclerItem
import me.xiaopan.assemblyadapter.AssemblyRecyclerItemFactory
import me.xiaopan.sketchsample.R
import me.xiaopan.sketchsample.bean.InfoMenu
import me.xiaopan.ssvt.bindView
import me.panpf.sketch.sample.R
import me.panpf.sketch.sample.bean.InfoMenu
import me.panpf.sketch.sample.bindView

class InfoMenuItemFactory : AssemblyRecyclerItemFactory<InfoMenuItemFactory.InfoMenuItem>() {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package me.xiaopan.sketchsample.adapter.itemfactory
package me.panpf.sketch.sample.adapter.itemfactory

import android.view.View
import android.view.ViewGroup
import android.widget.ProgressBar
import android.widget.TextView
import me.xiaopan.assemblyadapter.AssemblyLoadMoreRecyclerItemFactory
import me.xiaopan.assemblyadapter.OnRecyclerLoadMoreListener
import me.xiaopan.sketchsample.R
import me.xiaopan.ssvt.bindView
import me.panpf.sketch.sample.R
import me.panpf.sketch.sample.bindView

class LoadMoreItemFactory(eventListener: OnRecyclerLoadMoreListener) : AssemblyLoadMoreRecyclerItemFactory(eventListener) {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package me.xiaopan.sketchsample.adapter.itemfactory
package me.panpf.sketch.sample.adapter.itemfactory

import android.content.Context
import android.view.ViewGroup
import android.widget.TextView
import me.xiaopan.assemblyadapter.AssemblyRecyclerItem
import me.xiaopan.assemblyadapter.AssemblyRecyclerItemFactory
import me.xiaopan.sketchsample.R
import me.xiaopan.ssvt.bindView
import me.panpf.sketch.sample.R
import me.panpf.sketch.sample.bindView

class MenuTitleItemFactory : AssemblyRecyclerItemFactory<MenuTitleItemFactory.MenuTitleItem>() {
override fun isTarget(o: Any): Boolean {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.xiaopan.sketchsample.adapter.itemfactory
package me.panpf.sketch.sample.adapter.itemfactory

import android.content.Context
import android.support.v7.widget.GridLayoutManager
Expand All @@ -9,11 +9,11 @@ import android.view.ViewGroup
import me.xiaopan.assemblyadapter.AssemblyRecyclerItem
import me.xiaopan.assemblyadapter.AssemblyRecyclerItemFactory
import me.xiaopan.sketch.util.SketchUtils
import me.xiaopan.sketchsample.ImageOptions
import me.xiaopan.sketchsample.R
import me.xiaopan.sketchsample.util.AppConfig
import me.xiaopan.sketchsample.widget.SampleImageView
import me.xiaopan.ssvt.bindView
import me.panpf.sketch.sample.ImageOptions
import me.panpf.sketch.sample.R
import me.panpf.sketch.sample.bindView
import me.panpf.sketch.sample.util.AppConfig
import me.panpf.sketch.sample.widget.SampleImageView

class MyPhotoItemFactory(private val onImageClickListener: OnImageClickListener?) : AssemblyRecyclerItemFactory<MyPhotoItemFactory.PhotoAlbumItem>() {
private var itemSize: Int = 0
Expand Down
Loading

0 comments on commit d2c91a5

Please sign in to comment.