Load feature graphic (currently large icon)

This commit is contained in:
mvp76 2016-11-18 15:55:44 +01:00
parent 30bcad963e
commit f3e88535f9
2 changed files with 13 additions and 1 deletions

View File

@ -113,6 +113,18 @@ public class AppDetails2 extends AppCompatActivity implements ShareChooserDialog
lm.setStackFromEnd(false); lm.setStackFromEnd(false);
mRecyclerView.setLayoutManager(lm); mRecyclerView.setLayoutManager(lm);
mRecyclerView.setAdapter(mAdapter); mRecyclerView.setAdapter(mAdapter);
// Load the feature graphic, if present
if (!TextUtils.isEmpty(mApp.iconUrlLarge)) {
ImageView ivFeatureGraphic = (ImageView) findViewById(R.id.feature_graphic);
DisplayImageOptions displayImageOptions = new DisplayImageOptions.Builder()
.cacheInMemory(false)
.cacheOnDisk(true)
.imageScaleType(ImageScaleType.NONE)
.bitmapConfig(Bitmap.Config.RGB_565)
.build();
ImageLoader.getInstance().displayImage(mApp.iconUrlLarge, ivFeatureGraphic, displayImageOptions);
}
} }
private String getPackageNameFromIntent(Intent intent) { private String getPackageNameFromIntent(Intent intent) {

View File

@ -26,7 +26,7 @@
app:layout_scrollFlags="scroll|exitUntilCollapsed"> app:layout_scrollFlags="scroll|exitUntilCollapsed">
<ImageView <ImageView
android:id="@+id/backdrop" android:id="@+id/feature_graphic"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:scaleType="centerCrop" android:scaleType="centerCrop"