how to set textview in bottom
my textview display in emulator top..how to change into the bottom...
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/tv">
<TextView
android:text="EmbDes Technologies"
android:id="@+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#ff000000"
android:textStyle="bold"
android:gravity="bottom"/>
<Gallery xmlns:android="http:开发者_StackOverflow社区//schemas.android.com/apk/res/android"
android:id="@+id/videoGrdVw"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</RelativeLayout>
Although your question seems to be obscure, what i understand is that you want to align it to the bottom. Here is how you can do it:
Add the following property to your textview:
android:gravity="bottom"
Hope this helps. If it does, mark it as answered and do vote for it.
Regards.
well, Button,TextView are all widget and subclasses from view you can use textview as button easily .. i.e. click responding:
TextView tt=(TextView)findViewById(R.id.tt1);
tt.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
//here I change background color when press on textviw element
v.setBackgroundColor(Color.RED);
}
});
I hope this helps you, if not ask exactly what are you going to do..
good luck
Mohammed,
using the relative layout, align one view to the top with a bottom margin equal to the height of the bottom view and align the bottom view to the bottom of the relative layout...
精彩评论