mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-17 12:49:19 +01:00
Disable tiling, for now
This commit is contained in:
parent
3a748a9453
commit
fefc6ba0e9
@ -1,4 +1,6 @@
|
||||
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: 'me.tatarka.retrolambda'
|
||||
|
||||
@ -77,6 +79,7 @@ dependencies {
|
||||
compile 'com.jakewharton.timber:timber:3.1.0'
|
||||
compile 'uk.co.ribot:easyadapter:1.5.0@aar'
|
||||
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 "frankiesardo:icepick:$ICEPICK_VERSION"
|
||||
provided "frankiesardo:icepick-processor:$ICEPICK_VERSION"
|
||||
|
@ -42,6 +42,7 @@ public class ReaderActivity extends BaseRxActivity<ReaderPresenter> {
|
||||
|
||||
createAdapter();
|
||||
setupViewPager();
|
||||
enableHardwareAcceleration();
|
||||
}
|
||||
|
||||
@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.data.models.Page;
|
||||
import eu.kanade.mangafeed.ui.activity.ReaderActivity;
|
||||
import eu.kanade.mangafeed.util.MangaImageRegionDecoder;
|
||||
import eu.kanade.mangafeed.util.PageFileTarget;
|
||||
|
||||
public class ReaderPageFragment extends Fragment {
|
||||
@ -52,11 +53,14 @@ public class ReaderPageFragment extends Fragment {
|
||||
}
|
||||
|
||||
private void loadImage() {
|
||||
if (mUrl != null) {
|
||||
Glide.with(getActivity())
|
||||
.load(mUrl)
|
||||
.downloadOnly(new PageFileTarget(imageView));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
imageView = (SubsamplingScaleImageView)inflater.inflate(R.layout.fragment_page, container, false);
|
||||
@ -65,36 +69,10 @@ public class ReaderPageFragment extends Fragment {
|
||||
imageView.setMinimumScaleType(SubsamplingScaleImageView.SCALE_TYPE_CENTER_INSIDE);
|
||||
imageView.setOnTouchListener((view, motionEvent) ->
|
||||
((ReaderActivity) getActivity()).getViewPager().onImageTouch(motionEvent));
|
||||
imageView.setOnImageEventListener(new SubsamplingScaleImageView.OnImageEventListener() {
|
||||
@Override
|
||||
public void onReady() {
|
||||
imageView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImageLoaded() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPreviewLoadError(Exception e) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImageLoadError(Exception e) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTileLoadError(Exception e) {
|
||||
}
|
||||
});
|
||||
loadImage();
|
||||
|
||||
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;
|
||||
|
||||
public class PageFileTarget extends ViewTarget<SubsamplingScaleImageView, File> {
|
||||
public static final String TAG = PageFileTarget.class.getSimpleName();
|
||||
|
||||
public PageFileTarget(SubsamplingScaleImageView view) {
|
||||
super(view);
|
||||
@ -31,6 +30,7 @@ public class PageFileTarget extends ViewTarget<SubsamplingScaleImageView, File>
|
||||
|
||||
@Override
|
||||
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 {
|
||||
repositories {
|
||||
jcenter()
|
||||
maven {
|
||||
url 'https://repos.zeroturnaround.com/nexus/content/repositories/zt-public-releases'
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
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 'me.tatarka:gradle-retrolambda:3.2.3'
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
|
Loading…
Reference in New Issue
Block a user