Add this two methods to your Adapter.
@Override
public int getViewTypeCount() {
return getCount();
}
@Override
public int getItemViewType(int position) {
return position;
}
More Related Contents:
- Unreachable statement for if statement [closed]
- Sending data back to the Main Activity in Android
- How to completely uninstall Android Studio from windows(v10)?
- Dialog throwing “Unable to add window — token null is not for an application” with getApplication() as context
- How do I find out if the GPS of an Android device is enabled
- How to resume existing Fragment from BackStack
- How to set mobile system time and date in android?
- How to interpret Logcat
- How do I know the map is ready to get used when using the SupportMapFragment?
- Using contextmenu with listview in android
- Error: Status{statusCode=DEVELOPER_ERROR, resolution=null}
- How to open a PDF via Intent from SD card
- How do I use tools:overrideLibrary in a build.gradle file?
- How to cancel an Dialog themed like Activity when touched outside the window?
- How do I repeat a method every 10 minutes after a button press and end it on another button press
- How to change the Tabs Images in the TabHost
- Should I use android: process =”:remote” in my receiver?
- Confusion: How does SQLiteOpenHelper onUpgrade() behave? And together with import of an old database backup?
- SQLite simultaneous reading and writing
- Is there a way to use the SpeechRecognizer API directly for speech input?
- ActionBar MenuItem Divider
- Scala Programming for Android
- Disable specific dates of day in Android date picker
- Cloud Firestore: FAILED_PRECONDITION: The query requires an index
- Firebase Cloud Messaging different keys
- Gradle: How to publish a Android library to local repository
- Android Studio 4.2 doesn’t show signing report in the Gradle bar
- How can I programmatically take a screenshot of a webview, capturing the full page?
- Time difference between two times
- Audio format for iOS and Android