Ohk, Things went fine, and i was able to design a new layout like this- <?xml version="1.0" encoding="utf-8"?> <RelativeLayout android:id="@+id/widget101" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" >
<RelativeLayout android:id="@+id/widget110" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_alignParentLeft="true" > <TextView android:id="@+id/widget112" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" android:layout_centerVertical="true" android:layout_centerHorizontal="true" > </TextView> <Button android:id="@+id/widget111" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button" android:layout_alignParentTop="true" android:layout_alignParentLeft="true" > </Button> <Button android:id="@+id/widget113" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button" android:layout_alignParentTop="true" android:layout_alignParentRight="true" > </Button> </RelativeLayout> <ListView android:id="@+id/widget114" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@+id/tweetList" android:layout_alignParentLeft="true" > </ListView> </RelativeLayout> Things stay fine until i assign the adapter to the list i have created- public class MainActivity extends Activity { /** Called when the activity is first created. */ String[] data={"1","2","3"}; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ListView tweetList = (ListView) findViewById(R.id.tweetList); tweetList.setAdapter(new ArrayAdapter<String>(this,R.id.tweetList,data)); } } as soon as i add the last line, problems start. whats wrong? On Apr 19, 6:24 am, SheikhAman <shekh.a...@gmail.com> wrote: > ohh, all of the tags didnt have '>' with them. > I have already added them but they weren't copied dont know why, so > thats not a problem. > > On Apr 19, 6:12 am, SheikhAman <shekh.a...@gmail.com> wrote: > > > > > Oops! > > Sorry.. > > here is the correct one- > > > <?xml version="1.0" encoding="utf-8"?> > > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ > > android" > > android:orientation="vertical" > > android:layout_width="fill_parent" > > android:layout_height="fill_parent" > > > > > <RelativeLayout > > android:id="@+id/widget28" > > android:layout_width="wrap_content" > > android:layout_height="wrap_content" > > android:layout_x="17px" > > android:layout_y="10px" > > > <Button > > android:id="@+id/widget40" > > android:layout_width="wrap_content" > > android:layout_height="wrap_content" > > android:text="Button" > > android:layout_alignTop="@+id/widget39" > > android:layout_toRightOf="@+id/widget38" > > > </Button> > > <TextView > > android:id="@+id/widget39" > > android:layout_width="wrap_content" > > android:layout_height="wrap_content" > > android:text="TextView" > > android:layout_alignParentBottom="true" > > android:layout_alignParentLeft="true" > > </TextView> > > > <Button > > android:id="@+id/widget38" > > android:layout_width="wrap_content" > > android:layout_height="wrap_content" > > android:text="Button" > > android:layout_alignParentTop="true" > > android:layout_alignParentRight="true" > > </Button> > > > </RelativeLayout> > > <ListView > > android:id="@+id/tweetList" > > android:layout_width="wrap_content" > > android:layout_height="wrap_content" > > /> > > </LinearLayout> > > > Please tell. > > > On Apr 18, 11:11 pm, Anurag Singh <anusingh...@gmail.com> wrote: > > > > I think, it's not right way. > > > > <TextView > > > android:id="@+id/widget39" > > > android:layout_width="wrap_ > > > content" > > > android:layout_height="wrap_content" > > > android:text="TextView" > > > android:layout_alignParentBottom="true" > > > android:layout_alignParentLeft="true" > > > > <Button > > > android:id="@+id/widget38" > > > android:layout_width="wrap_content" > > > android:layout_height="wrap_content" > > > android:text="Button" > > > android:layout_alignParentTop="true" > > > android:layout_alignParentRight="true" > > > > </Button> > > > </TextView> > > > You have mention Button in a TextView. > > > > - Anurag Singh > > > > Hi. please find the link to attached file, i need to have this kinda > > > > > layout. > > > > is it possible?? > > > > well perhaps it is, but im not getting it how to do it. > > > > i want to specify the whole layout in the xml, but it gives runtime > > > > error > > > > > here's the link to the blue print of desired layout: > > > > >http://lh6.ggpht.com/_o9EYB0b5APY/S8s-coQE-KI/AAAAAAAACrA/KJUl5ANBi88... > > > > > here's my main.xml- > > > > > <?xml version="1.0" encoding="utf-8"?> > > > > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ > > > > android" > > > > android:orientation="vertical" > > > > android:layout_width="fill_parent" > > > > android:layout_height="fill_parent" > > > > > <RelativeLayout > > > > android:id="@+id/widget28" > > > > android:layout_width="wrap_content" > > > > android:layout_height="wrap_content" > > > > android:layout_x="17px" > > > > android:layout_y="10px" > > > > > <Button > > > > android:id="@+id/widget40" > > > > android:layout_width="wrap_content" > > > > android:layout_height="wrap_content" > > > > android:text="Button" > > > > android:layout_alignTop="@+id/widget39" > > > > android:layout_toRightOf="@+id/widget38" > > > > > </Button> > > > > <TextView > > > > android:id="@+id/widget39" > > > > android:layout_width="wrap_content" > > > > android:layout_height="wrap_content" > > > > android:text="TextView" > > > > android:layout_alignParentBottom="true" > > > > android:layout_alignParentLeft="true" > > > > > <Button > > > > android:id="@+id/widget38" > > > > android:layout_width="wrap_content" > > > > android:layout_height="wrap_content" > > > > android:text="Button" > > > > android:layout_alignParentTop="true" > > > > android:layout_alignParentRight="true" > > > > > </Button> > > > > </TextView> > > > > </RelativeLayout> > > > > <ListView > > > > android:id="@+id/tweetList" > > > > android:layout_width="wrap_content" > > > > android:layout_height="wrap_content" > > > > /> > > > > </LinearLayout> > > > > > is anything wrong?? > > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups "Android Developers" group. > > > > To post to this group, send email to android-developers@googlegroups.com > > > > To unsubscribe from this group, send email to > > > > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > > > > For more options, visit this group at > > > >http://groups.google.com/group/android-developers?hl=en > > > > -- > > > You received this message because you are subscribed to the Google > > > Groups "Android Developers" group. > > > To post to this group, send email to android-developers@googlegroups.com > > > To unsubscribe from this group, send email to > > > android-developers+unsubscr...@googlegroups.com > > > For more options, visit this group > > > athttp://groups.google.com/group/android-developers?hl=en > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group > > athttp://groups.google.com/group/android-developers?hl=en > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group > athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en