mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 08:01:50 +01:00
Disable tiling, for now
This commit is contained in:
parent
3a748a9453
commit
fefc6ba0e9
@ -1,4 +1,6 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
// This does not break the build when Android Studio is missing the JRebel for Android plugin.
|
||||||
|
apply plugin: 'com.zeroturnaround.jrebel.android'
|
||||||
apply plugin: 'com.neenbedankt.android-apt'
|
apply plugin: 'com.neenbedankt.android-apt'
|
||||||
apply plugin: 'me.tatarka.retrolambda'
|
apply plugin: 'me.tatarka.retrolambda'
|
||||||
|
|
||||||
@ -77,6 +79,7 @@ dependencies {
|
|||||||
compile 'com.jakewharton.timber:timber:3.1.0'
|
compile 'com.jakewharton.timber:timber:3.1.0'
|
||||||
compile 'uk.co.ribot:easyadapter:1.5.0@aar'
|
compile 'uk.co.ribot:easyadapter:1.5.0@aar'
|
||||||
compile 'ch.acra:acra:4.6.2'
|
compile 'ch.acra:acra:4.6.2'
|
||||||
|
compile 'com.github.castorflex.verticalviewpager:library:19.0.1'
|
||||||
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.4.1'
|
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.4.1'
|
||||||
compile "frankiesardo:icepick:$ICEPICK_VERSION"
|
compile "frankiesardo:icepick:$ICEPICK_VERSION"
|
||||||
provided "frankiesardo:icepick-processor:$ICEPICK_VERSION"
|
provided "frankiesardo:icepick-processor:$ICEPICK_VERSION"
|
||||||
|
@ -42,6 +42,7 @@ public class ReaderActivity extends BaseRxActivity<ReaderPresenter> {
|
|||||||
|
|
||||||
createAdapter();
|
createAdapter();
|
||||||
setupViewPager();
|
setupViewPager();
|
||||||
|
enableHardwareAcceleration();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -122,4 +123,10 @@ public class ReaderActivity extends BaseRxActivity<ReaderPresenter> {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void enableHardwareAcceleration() {
|
||||||
|
getWindow().setFlags(
|
||||||
|
WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
|
||||||
|
WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView;
|
|||||||
import eu.kanade.mangafeed.R;
|
import eu.kanade.mangafeed.R;
|
||||||
import eu.kanade.mangafeed.data.models.Page;
|
import eu.kanade.mangafeed.data.models.Page;
|
||||||
import eu.kanade.mangafeed.ui.activity.ReaderActivity;
|
import eu.kanade.mangafeed.ui.activity.ReaderActivity;
|
||||||
|
import eu.kanade.mangafeed.util.MangaImageRegionDecoder;
|
||||||
import eu.kanade.mangafeed.util.PageFileTarget;
|
import eu.kanade.mangafeed.util.PageFileTarget;
|
||||||
|
|
||||||
public class ReaderPageFragment extends Fragment {
|
public class ReaderPageFragment extends Fragment {
|
||||||
@ -52,9 +53,12 @@ public class ReaderPageFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void loadImage() {
|
private void loadImage() {
|
||||||
Glide.with(getActivity())
|
if (mUrl != null) {
|
||||||
.load(mUrl)
|
Glide.with(getActivity())
|
||||||
.downloadOnly(new PageFileTarget(imageView));
|
.load(mUrl)
|
||||||
|
.downloadOnly(new PageFileTarget(imageView));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -65,36 +69,10 @@ public class ReaderPageFragment extends Fragment {
|
|||||||
imageView.setMinimumScaleType(SubsamplingScaleImageView.SCALE_TYPE_CENTER_INSIDE);
|
imageView.setMinimumScaleType(SubsamplingScaleImageView.SCALE_TYPE_CENTER_INSIDE);
|
||||||
imageView.setOnTouchListener((view, motionEvent) ->
|
imageView.setOnTouchListener((view, motionEvent) ->
|
||||||
((ReaderActivity) getActivity()).getViewPager().onImageTouch(motionEvent));
|
((ReaderActivity) getActivity()).getViewPager().onImageTouch(motionEvent));
|
||||||
imageView.setOnImageEventListener(new SubsamplingScaleImageView.OnImageEventListener() {
|
|
||||||
@Override
|
|
||||||
public void onReady() {
|
|
||||||
imageView.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
loadImage();
|
||||||
public void onImageLoaded() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPreviewLoadError(Exception e) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onImageLoadError(Exception e) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onTileLoadError(Exception e) {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return imageView;
|
return imageView;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
|
||||||
super.onActivityCreated(savedInstanceState);
|
|
||||||
loadImage();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,6 @@ import java.io.File;
|
|||||||
import eu.kanade.mangafeed.R;
|
import eu.kanade.mangafeed.R;
|
||||||
|
|
||||||
public class PageFileTarget extends ViewTarget<SubsamplingScaleImageView, File> {
|
public class PageFileTarget extends ViewTarget<SubsamplingScaleImageView, File> {
|
||||||
public static final String TAG = PageFileTarget.class.getSimpleName();
|
|
||||||
|
|
||||||
public PageFileTarget(SubsamplingScaleImageView view) {
|
public PageFileTarget(SubsamplingScaleImageView view) {
|
||||||
super(view);
|
super(view);
|
||||||
@ -31,6 +30,7 @@ public class PageFileTarget extends ViewTarget<SubsamplingScaleImageView, File>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResourceReady(File resource, GlideAnimation<? super File> glideAnimation) {
|
public void onResourceReady(File resource, GlideAnimation<? super File> glideAnimation) {
|
||||||
view.setImage(ImageSource.uri(Uri.fromFile(resource)));
|
view.setImage(ImageSource.uri(Uri.fromFile(resource))
|
||||||
|
.tilingDisabled());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,14 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
|
maven {
|
||||||
|
url 'https://repos.zeroturnaround.com/nexus/content/repositories/zt-public-releases'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:1.3.0'
|
classpath 'com.android.tools.build:gradle:1.3.0'
|
||||||
|
// This does not break the build when Android Studio is missing the JRebel for Android plugin.
|
||||||
|
classpath 'com.zeroturnaround.jrebel.android:jr-android-gradle:0.9.+'
|
||||||
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.7'
|
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.7'
|
||||||
classpath 'me.tatarka:gradle-retrolambda:3.2.3'
|
classpath 'me.tatarka:gradle-retrolambda:3.2.3'
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
Loading…
Reference in New Issue
Block a user