+91-9893712371

Home » Android Studio Programs » Android Studio: ListView on button click

Android Studio: ListView on button click

In this android application, we are using two buttons and a ‘ListView’ control to show items in a list format.

In this app, we will use two arrays, one for mobiles list and one for laptops list.

When user will click on the first button it our control will show the list of mobiles and when second button will be clicked the list will be changed in laptops list.

activity_main.xml

activity_listview.xml

MainActivity.java

listview.java

Our app will be look like this.

android listview

Leave a Reply

Your email address will not be published. Required fields are marked *