Skip to content

Commit

Permalink
🔨 hugeImageEnabled merge to zoomEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Flyge committed Oct 10, 2017
1 parent c3cf8c3 commit 3317705
Show file tree
Hide file tree
Showing 44 changed files with 424 additions and 641 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
@@ -0,0 +1 @@
* :hammer: hugeImageEnabled 合并到 zoomEnabled,现在只有 zoomEnabled 一个开关
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import me.xiaopan.sketch.uri.UriModel
import me.xiaopan.sketch.util.SketchUtils
import me.xiaopan.sketch.util.UnableCreateDirException
import me.xiaopan.sketch.util.UnableCreateFileException
import me.xiaopan.sketch.viewfun.huge.Tile
import me.xiaopan.sketch.zoom.huge.Tile
import java.io.File
import java.util.*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,32 +187,9 @@ class MainActivity : BaseActivity(), AppListFragment.GetAppListTagStripListener,
menuList.add(CheckMenu(this, "Disable Disk Cache", AppConfig.Key.GLOBAL_DISABLE_CACHE_IN_DISK, null, menuClickListener))

menuList.add("Gesture Zoom Menu")
menuList.add(CheckMenu(this, "Enabled Gesture Zoom In Detail Page", AppConfig.Key.SUPPORT_ZOOM, object : CheckMenu.OnCheckedChangedListener {
override fun onCheckedChangedBefore(checked: Boolean) {
if (!checked && AppConfig.getBoolean(baseContext, AppConfig.Key.SUPPORT_HUGE_IMAGE)) {
AppConfig.putBoolean(baseContext, AppConfig.Key.SUPPORT_HUGE_IMAGE, false)
}
}

override fun onCheckedChanged(checked: Boolean) {

}
}, menuClickListener))
menuList.add(CheckMenu(this, "Enabled Gesture Zoom In Detail Page", AppConfig.Key.SUPPORT_ZOOM, null, menuClickListener))
menuList.add(CheckMenu(this, "Enabled Read Mode In Detail Page", AppConfig.Key.READ_MODE, null, menuClickListener))
menuList.add(CheckMenu(this, "Enabled Location Animation In Detail Page", AppConfig.Key.LOCATION_ANIMATE, null, menuClickListener))

menuList.add("Huge Image Menu")
menuList.add(CheckMenu(this, "Enabled Block Display Huge Image In Detail Page", AppConfig.Key.SUPPORT_HUGE_IMAGE, object : CheckMenu.OnCheckedChangedListener {
override fun onCheckedChangedBefore(checked: Boolean) {
if (checked && !AppConfig.getBoolean(baseContext, AppConfig.Key.SUPPORT_ZOOM)) {
AppConfig.putBoolean(baseContext, AppConfig.Key.SUPPORT_ZOOM, true)
}
}

override fun onCheckedChanged(checked: Boolean) {

}
}, menuClickListener))
menuList.add(CheckMenu(this, "Visible To User Decode Huge Image In Detail Page", AppConfig.Key.PAGE_VISIBLE_TO_USER_DECODE_HUGE_IMAGE, null, menuClickListener))

menuList.add("GIF Menu")
Expand Down
4 changes: 2 additions & 2 deletions sample/src/main/java/me/xiaopan/sketchsample/bean/Image.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import android.os.Parcel
import android.os.Parcelable

class Image() : Parcelable {
var normalQualityUrl: String? = null
var rawQualityUrl: String? = null
lateinit var normalQualityUrl: String
lateinit var rawQualityUrl: String

constructor(parcel: Parcel) : this() {
normalQualityUrl = parcel.readString()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import android.widget.TextView
import android.widget.Toast
import me.xiaopan.assemblyadapter.AssemblyFragmentStatePagerAdapter
import me.xiaopan.sketch.util.SketchUtils
import me.xiaopan.sketch.viewfun.zoom.ImageZoomer
import me.xiaopan.sketch.zoom.ImageZoomer
import me.xiaopan.sketchsample.BaseFragment
import me.xiaopan.sketchsample.BindContentView
import me.xiaopan.sketchsample.R
Expand Down
Loading

0 comments on commit 3317705

Please sign in to comment.