0

I have a list of teachers that i need users of my app to be able to see. All of the tutorials on how to use a SQL database were teaching how to add entries and other things that i don't need to know how to do right now. All i need is for me to be able to add people into the database who's info will not be changed and display it in a scrollable list that where users can pick out a name and tap on it and open a new activity with more info

for example:

lastname, firstname lastname, firstname lastname, firstname

and when one of those is pressed on:

 <LinearLayout
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_alignParentBottom="true"
    android:layout_alignParentRight="true"
    android:layout_alignParentEnd="true">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Lastname, Firstname"
        android:id="@+id/textView"
        android:textSize="28dp" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="EXT: 1234"
        android:id="@+id/textView2"
        android:phoneNumber="false"
        android:textSize="24dp" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Email: lastname.firstname@domain.com"
        android:id="@+id/textView3"
        android:textSize="20dp" />
</LinearLayout>

How can i do this? Do i even need to use a database?

Sagar Maiyad
  • 12,655
  • 9
  • 63
  • 99
user3566841
  • 209
  • 1
  • 4
  • 10
  • possible duplicate of [How to ship an Android application with a database?](http://stackoverflow.com/questions/513084/how-to-ship-an-android-application-with-a-database) – Rajesh Apr 30 '14 at 05:20
  • Maybe, you don't even need a database. Probably, you just need to parse an xml file and show its contens in a ListView or an ExpandableListView. – Phantômaxx Apr 30 '14 at 07:44
  • 1. Database is a good option for scalable app i.e if total number of teachers can increase 2. It is not difficult to find such _sql search and display on screen_ example – Software Engineer Apr 30 '14 at 09:27

0 Answers0