Search Results

Search found 2 results on 1 pages for 'leenolasco'.

Page 1/1 | 1 

  • text view not wrapping

    - by leenolasco
    I just tried a sample of retrieving and passing it to a textview. I am having some trouble wrapping my textview. The bottom part is not completely shown. What do i need to add to the xml file for it to completely show the bottom part of the data? <?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:gravity="left" android:orientation="vertical" android:padding="5dp" > <ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentLeft="true" > <TextView android:id="@+id/tvFA" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_marginLeft="36dp" android:layout_marginTop="36dp" android:text="TextView" android:maxLines = "1000" android:scrollbars = "vertical" android:textSize="20sp" /> </ScrollView> </RelativeLayout>

    Read the article

  • List View Array from Database

    - by leenolasco
    I have retrieved data and successfully shown it in text view. What do i modify in my codes to make it look like a list view? And also how do modify my listview programatically(adding size and padding)? Here is my a part of my DBclass in selecting the items that I've displayed getFAData() { // TODO Auto-generated method stub String [] columns = new String[]{Row_Name}; Cursor c = ourDB.query(db_Table, columns, null, null, null, null, null); String res = ""; int iRow = c.getColumnIndex(Row_Name); //int iDesc = c.getColumnIndex(Row_Desc); //int iID = c.getColumnIndex(Row_id); for (c.moveToFirst(); !c.isAfterLast(); c.moveToNext()) { res = res + c.getString(iRow) + "\n"; } return res; } And here is class file: public class FirstAid extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.firstaid); displayresult(); } public void displayresult (){ TextView tvFa = (TextView) findViewById(R.id.tvFA); tvFa.setMovementMethod(new ScrollingMovementMethod()); DbHelper tblFa = new DbHelper(this); tblFa.open(); String result = tblFa.getFAData(); tblFa.close(); tvFa.setText(result); } }

    Read the article

1