Advertisement
Guest User

Untitled

a guest
May 29th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2.  
  3. <?xml version="1.0" encoding="utf-8"?>
  4. <RelativeLayout
  5. xmlns:android="http://schemas.android.com/apk/res/android"
  6. android:layout_height="fill_parent"
  7. android:layout_width="fill_parent" >
  8. <ListView
  9. android:id="@+id/list"
  10. android:layout_height="wrap_content"
  11. android:layout_width="fill_parent"
  12. android:layout_marginBottom="50dp"
  13. android:layout_alignParentTop="true" />
  14. <TextView
  15. android:text="Some text"
  16. android:gravity="center"
  17. android:layout_height="wrap_content"
  18. android:layout_width="fill_parent"
  19. android:layout_alignParentBottom="true" />
  20. </RelativeLayout>
  21.  
  22. TextView tv1=new TextView(context);
  23. Resources res=getResources();
  24. Drawable d1=res.getDrawable(R.drawable.YourImage);
  25. tv1.setBackgroundDrawable(d1);
  26. ListView.addHeaderView(tv1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement