remove flavor image borders
add workaround against UI flicker bug
This commit is contained in:
parent
d7734987ad
commit
1c4b41085e
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.fox.ttrss"
|
package="org.fox.ttrss"
|
||||||
android:versionCode="245"
|
android:versionCode="246"
|
||||||
android:versionName="1.46" >
|
android:versionName="1.47" >
|
||||||
|
|
||||||
<uses-sdk
|
<uses-sdk
|
||||||
android:minSdkVersion="9"
|
android:minSdkVersion="9"
|
||||||
|
@ -40,6 +40,8 @@ import com.google.gson.JsonElement;
|
|||||||
import com.nostra13.universalimageloader.core.DisplayImageOptions;
|
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.imageaware.ImageAware;
|
||||||
|
import com.nostra13.universalimageloader.core.imageaware.ImageViewAware;
|
||||||
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener;
|
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener;
|
||||||
|
|
||||||
import org.fox.ttrss.types.Article;
|
import org.fox.ttrss.types.Article;
|
||||||
@ -870,15 +872,18 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
if (imgSrc.indexOf("//") == 0)
|
if (imgSrc.indexOf("//") == 0)
|
||||||
imgSrc = "http:" + imgSrc;
|
imgSrc = "http:" + imgSrc;
|
||||||
|
|
||||||
DisplayImageOptions options = new DisplayImageOptions.Builder().
|
DisplayImageOptions options = new DisplayImageOptions.Builder()
|
||||||
cacheInMemory(true).
|
.cacheInMemory(true)
|
||||||
cacheOnDisk(true).
|
.resetViewBeforeLoading(true)
|
||||||
build();
|
.cacheOnDisk(true)
|
||||||
|
.build();
|
||||||
|
|
||||||
final ImageView flavorImageView = holder.flavorImageView;
|
final ImageView flavorImageView = holder.flavorImageView;
|
||||||
final ViewGroup flavorImageHolder = holder.flavorImageHolder;
|
final ViewGroup flavorImageHolder = holder.flavorImageHolder;
|
||||||
|
|
||||||
ImageLoader.getInstance().displayImage(imgSrc, holder.flavorImageView, options, new ImageLoadingListener() {
|
ImageAware imageAware = new ImageViewAware(holder.flavorImageView, false);
|
||||||
|
|
||||||
|
ImageLoader.getInstance().displayImage(imgSrc, imageAware, options, new ImageLoadingListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLoadingCancelled(String arg0,
|
public void onLoadingCancelled(String arg0,
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle" >
|
|
||||||
|
|
||||||
<corners android:radius="0dp" />
|
|
||||||
|
|
||||||
<stroke
|
|
||||||
android:width="1dp"
|
|
||||||
android:color="#cccccc" />
|
|
||||||
|
|
||||||
</shape>
|
|
@ -75,7 +75,7 @@
|
|||||||
android:id="@+id/flavorImageHolder"
|
android:id="@+id/flavorImageHolder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="10dp"
|
android:paddingBottom="4dp"
|
||||||
android:layout_span="2">
|
android:layout_span="2">
|
||||||
|
|
||||||
<org.fox.ttrss.util.EnlargingImageView
|
<org.fox.ttrss.util.EnlargingImageView
|
||||||
@ -84,10 +84,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:background="@drawable/flavor_image_border"
|
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:cropToPadding="true"
|
android:cropToPadding="true"
|
||||||
android:padding="2dp"
|
|
||||||
android:visibility="visible" />
|
android:visibility="visible" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
android:id="@+id/flavorImageHolder"
|
android:id="@+id/flavorImageHolder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="10dp"
|
android:paddingBottom="4dp"
|
||||||
android:layout_span="2">
|
android:layout_span="2">
|
||||||
|
|
||||||
<org.fox.ttrss.util.EnlargingImageView
|
<org.fox.ttrss.util.EnlargingImageView
|
||||||
@ -84,10 +84,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:background="@drawable/flavor_image_border"
|
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:cropToPadding="true"
|
android:cropToPadding="true"
|
||||||
android:padding="2dp"
|
|
||||||
android:visibility="visible" />
|
android:visibility="visible" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
@ -76,7 +76,7 @@
|
|||||||
android:id="@+id/flavorImageHolder"
|
android:id="@+id/flavorImageHolder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="10dp"
|
android:paddingBottom="4dp"
|
||||||
android:layout_span="2">
|
android:layout_span="2">
|
||||||
|
|
||||||
<org.fox.ttrss.util.EnlargingImageView
|
<org.fox.ttrss.util.EnlargingImageView
|
||||||
@ -85,10 +85,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:background="@drawable/flavor_image_border"
|
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:cropToPadding="true"
|
android:cropToPadding="true"
|
||||||
android:padding="2dp"
|
|
||||||
android:visibility="visible" />
|
android:visibility="visible" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
@ -76,7 +76,7 @@
|
|||||||
android:id="@+id/flavorImageHolder"
|
android:id="@+id/flavorImageHolder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="10dp"
|
android:paddingBottom="4dp"
|
||||||
android:layout_span="2">
|
android:layout_span="2">
|
||||||
|
|
||||||
<org.fox.ttrss.util.EnlargingImageView
|
<org.fox.ttrss.util.EnlargingImageView
|
||||||
@ -85,10 +85,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:background="@drawable/flavor_image_border"
|
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:cropToPadding="true"
|
android:cropToPadding="true"
|
||||||
android:padding="2dp"
|
|
||||||
android:visibility="visible" />
|
android:visibility="visible" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
Loading…
Reference in New Issue
Block a user