I am trying to position a button in a different place using absolute layout. I am using the following xml file:
<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/bcgrd">
<Button
android:id="@+id/start_challenge"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text = "Start Challenge"
android:textColor= "@color/light_gray"
android:background="@color/background">
</Button>
</AbsoluteLayout>
the java file contains the following code:
Button start_it = (Button)findViewById(R.id.start_challenge);
start_it.layout(200, 200, 200, 200);
but nothing happen (the '200's are just for the example. can anyone please tell me what I am doing wrong.
Thanks in advance.