i have RelativeLayout, and there is a textview in the RelativeLayout, i am getting position from server like ALIGN_PARENT_LEFT, ALIGN_PARENT_TOP, based on that value i want to change position of textview...
My xml file is....
<?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="@color/white"
android:id="@+id/relativelayout"
android:orientation="vertical" >
<TextView
android:id="@+id/share_text"
android:layout_width="100dp"
android:layout_height="60dp"
android:gravity="center"
android:background="@drawable/share_text" />
</RelativeLayout>
i have got knowledge from Set position of an EditText and TextView in a RelativeLayout programatically to chage the position but couldn't help me
can any body help me how to change position of textview dynamically...
try like this
what about
?
Of course you have to do some parsing of your server response, etc...