I am making an android application containing more than 200 buttons............ Each button respond to an activity...........Each activity contains a button, text view and and image............ Is there any short way so that i could get rid of these many activities and have a single activity with a button and an image.And when i will click a button then it displays me the respective image with a button in that single activity. My main activity containing two buttons named Urdu and English...........
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/main_first_background"
android:gravity="center"
android:orientation="vertical" >
<Button
android:id="@+id/urduForLang"
android:layout_width="200dp"
android:layout_height="80dp"
android:layout_gravity="center"
android:text="URDU"
android:textColor="@android:color/background_light" >
</Button>
<Button
android:id="@+id/EnglishForLang"
android:layout_width="200sp"
android:layout_height="80dp"
android:layout_below="@+id/urduForLang"
android:layout_gravity="center"
android:layout_marginTop="2dp"
android:text="English"
android:textColor="@android:color/background_light" >
</Button>
</RelativeLayout>
When user click on urdu then it opens up an activity containing 99 buttons and when english is clicked it opens up an activity with same buttons in english. So that i have to make 99 different activities ...which i realy dont want.
when the user touches any button then...then that activity with the respectice image and button will be displayed. Sorry for my english.................