Try this:
try
{
Drawable icon = getContext().getPackageManager().getApplicationIcon("com.example.testnotification");
imageView.setImageDrawable(icon);
}
catch (PackageManager.NameNotFoundException e)
{
e.printStackTrace();
}
More Related Contents:
- Focusable EditText inside ListView
- How to change the background color of Action Bar’s Option Menu in Android 4.2?
- How can incoming calls be answered programmatically in Android 5.0 (Lollipop)?
- FloatingActionButton example with Support Library
- RecyclerView expand/collapse items
- Sync data between Android App and webserver [closed]
- Capturing mobile phone traffic on Wireshark
- Select multiple images from android gallery
- Android how to display 2 listviews in one activity one after the other
- Android design support library for API 28 (P) not working
- Bitmaps in Android
- Get SSID when WIFI is connected
- Two launcher activities
- multiple screen support in android [duplicate]
- How to get Selected items from Multi Select List View
- Android: How to Programmatically set the size of a Layout
- Android – running a method periodically using postDelayed() call
- How to animate marker in android map api V2?
- EditText in Listview loses focus when pressed on Android 4.x
- How to programmatically trigger the touch event in android?
- Android HttpClient : NetworkOnMainThreadException
- Android RecyclerView: Change layout file LIST to GRID onOptionItemSelected
- Draw Circle on touch
- Calculate text size according to width of text area
- Android ScrollView layout problem
- Create/Copy File in Android Q using MediaStore
- Android Get Application’s ‘Home’ Data Directory
- How to look-up a contact’s name from their phone number on Android?
- Removing AppWidgets programmatically
- Calling camera from an activity, capturing an image and uploading to a server