article images pager: use proper app theme, fix vertical scaling

This commit is contained in:
Andrew Dolgov 2014-10-29 21:52:53 +03:00
parent c361b72949
commit 61bda147c8
3 changed files with 11 additions and 14 deletions

View File

@ -25,8 +25,6 @@ import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.assist.FailReason;
import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer;
import com.nostra13.universalimageloader.core.imageaware.ImageAware;
import com.nostra13.universalimageloader.core.imageaware.ImageViewAware;
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener;
import com.viewpagerindicator.UnderlinePageIndicator;
@ -85,12 +83,12 @@ public class ArticleImagesPagerActivity extends CommonActivity {
.displayer(new FadeInBitmapDisplayer(200))
.build();
ImageAware imageAware = new ImageViewAware(imgView, false);
//ImageAware imageAware = new ImageViewAware(imgView, false);
final ProgressBar progressBar = (ProgressBar) view.findViewById(R.id.flavor_image_progress);
final View errorMessage = view.findViewById(R.id.flavor_image_error);
ImageLoader.getInstance().displayImage(url, imageAware, options, new ImageLoadingListener() {
ImageLoader.getInstance().displayImage(url, imgView, options, new ImageLoadingListener() {
@Override
public void onLoadingStarted(String s, View view) {
@ -156,7 +154,7 @@ public class ArticleImagesPagerActivity extends CommonActivity {
m_prefs = PreferenceManager
.getDefaultSharedPreferences(getApplicationContext());
setTheme(R.style.DarkTheme);
setAppTheme(m_prefs);
super.onCreate(savedInstanceState);
@ -240,7 +238,6 @@ public class ArticleImagesPagerActivity extends CommonActivity {
return onContextItemSelected(item); // this is really bad :()
}
@Override
public boolean onContextItemSelected(android.view.MenuItem item) {
ViewPager pager = (ViewPager) findViewById(R.id.article_images_pager);

View File

@ -18,13 +18,12 @@
android:layout_gravity="center"
android:id="@+id/flavor_image_progress" />
<org.fox.ttrss.util.EnlargingImageView
android:id="@+id/flavor_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:layout_gravity="center"
android:scaleType="centerInside"
android:visibility="visible" />
android:scaleType="fitCenter" />
</FrameLayout>

View File

@ -1,8 +1,8 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/article_images"
android:layout_width="match_parent"
android:layout_width="fill_parent"
android:fitsSystemWindows="true"
android:layout_height="match_parent">
android:layout_height="fill_parent">
/*
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
@ -11,8 +11,9 @@
<android.support.v4.view.ViewPager
android:id="@+id/article_images_pager"
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:layout_alignParentTop="true"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
</android.support.v4.view.ViewPager>
<com.viewpagerindicator.UnderlinePageIndicator