Skip to content

Commit

Permalink
Use Android icon for missing app icons
Browse files Browse the repository at this point in the history
  • Loading branch information
javiersantos committed Jun 17, 2015
1 parent 6e996ea commit 80ecb98
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public int compare(PackageInfo p1, PackageInfo p2) {
appListIcon.add(packageManager.getApplicationIcon(packageInfo.applicationInfo));
} catch (OutOfMemoryError e) {
//TODO Workaround to avoid FC on some devices (OutOfMemoryError). Drawable should be cached before.
appListIcon.add(getResources().getDrawable(R.drawable.ic_launcher));
appListIcon.add(getResources().getDrawable(R.drawable.ic_android));
} catch (Exception e) {
e.printStackTrace();
}
Expand All @@ -201,7 +201,7 @@ public int compare(PackageInfo p1, PackageInfo p2) {
appSystemListIcon.add(packageManager.getApplicationIcon(packageInfo.applicationInfo));
} catch (OutOfMemoryError e) {
//TODO Workaround to avoid FC on some devices (OutOfMemoryError). Drawable should be cached before.
appSystemListIcon.add(getResources().getDrawable(R.drawable.ic_launcher));
appSystemListIcon.add(getResources().getDrawable(R.drawable.ic_android));
} catch (Exception e) {
e.printStackTrace();
}
Expand Down
Binary file added app/src/main/res/drawable-hdpi/ic_android.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-mdpi/ic_android.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xhdpi/ic_android.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxhdpi/ic_android.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_app.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
android:id="@+id/app_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_launcher"
android:src="@drawable/ic_android"
android:adjustViewBounds="true"
android:maxWidth="50dp"
android:maxHeight="50dp"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/app_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
android:adjustViewBounds="true"
android:maxWidth="50dp"
android:maxHeight="50dp"
android:src="@mipmap/ic_launcher"
android:src="@drawable/ic_android"
android:layout_marginRight="14dp"
android:layout_marginEnd="20dp"
android:layout_alignTop="@+id/txtName"
Expand Down

0 comments on commit 80ecb98

Please sign in to comment.