article images pager: use proper app theme, fix vertical scaling
This commit is contained in:
parent
c361b72949
commit
61bda147c8
@ -25,8 +25,6 @@ import com.nostra13.universalimageloader.core.DisplayImageOptions;
|
|||||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||||
import com.nostra13.universalimageloader.core.assist.FailReason;
|
import com.nostra13.universalimageloader.core.assist.FailReason;
|
||||||
import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer;
|
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.nostra13.universalimageloader.core.listener.ImageLoadingListener;
|
||||||
import com.viewpagerindicator.UnderlinePageIndicator;
|
import com.viewpagerindicator.UnderlinePageIndicator;
|
||||||
|
|
||||||
@ -85,12 +83,12 @@ public class ArticleImagesPagerActivity extends CommonActivity {
|
|||||||
.displayer(new FadeInBitmapDisplayer(200))
|
.displayer(new FadeInBitmapDisplayer(200))
|
||||||
.build();
|
.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 ProgressBar progressBar = (ProgressBar) view.findViewById(R.id.flavor_image_progress);
|
||||||
final View errorMessage = view.findViewById(R.id.flavor_image_error);
|
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
|
@Override
|
||||||
public void onLoadingStarted(String s, View view) {
|
public void onLoadingStarted(String s, View view) {
|
||||||
|
|
||||||
@ -156,7 +154,7 @@ public class ArticleImagesPagerActivity extends CommonActivity {
|
|||||||
m_prefs = PreferenceManager
|
m_prefs = PreferenceManager
|
||||||
.getDefaultSharedPreferences(getApplicationContext());
|
.getDefaultSharedPreferences(getApplicationContext());
|
||||||
|
|
||||||
setTheme(R.style.DarkTheme);
|
setAppTheme(m_prefs);
|
||||||
|
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
@ -240,7 +238,6 @@ public class ArticleImagesPagerActivity extends CommonActivity {
|
|||||||
return onContextItemSelected(item); // this is really bad :()
|
return onContextItemSelected(item); // this is really bad :()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextItemSelected(android.view.MenuItem item) {
|
public boolean onContextItemSelected(android.view.MenuItem item) {
|
||||||
ViewPager pager = (ViewPager) findViewById(R.id.article_images_pager);
|
ViewPager pager = (ViewPager) findViewById(R.id.article_images_pager);
|
||||||
|
@ -18,13 +18,12 @@
|
|||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:id="@+id/flavor_image_progress" />
|
android:id="@+id/flavor_image_progress" />
|
||||||
|
|
||||||
|
|
||||||
<org.fox.ttrss.util.EnlargingImageView
|
<org.fox.ttrss.util.EnlargingImageView
|
||||||
android:id="@+id/flavor_image"
|
android:id="@+id/flavor_image"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:scaleType="centerInside"
|
android:scaleType="fitCenter" />
|
||||||
android:visibility="visible" />
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
@ -1,8 +1,8 @@
|
|||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/article_images"
|
android:id="@+id/article_images"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="fill_parent"
|
||||||
android:fitsSystemWindows="true"
|
android:fitsSystemWindows="true"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="fill_parent">
|
||||||
/*
|
/*
|
||||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||||
@ -11,8 +11,9 @@
|
|||||||
|
|
||||||
<android.support.v4.view.ViewPager
|
<android.support.v4.view.ViewPager
|
||||||
android:id="@+id/article_images_pager"
|
android:id="@+id/article_images_pager"
|
||||||
android:layout_width="match_parent"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_height="match_parent" >
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="fill_parent" >
|
||||||
</android.support.v4.view.ViewPager>
|
</android.support.v4.view.ViewPager>
|
||||||
|
|
||||||
<com.viewpagerindicator.UnderlinePageIndicator
|
<com.viewpagerindicator.UnderlinePageIndicator
|
||||||
|
Loading…
Reference in New Issue
Block a user