Layout for Android Application on TV

wong_udik

New Member
I am designing an application for TV. When I load my application to TV screen, I see it still has the sizes of a smartphone. I have been playing with different dpi's but not working. Spent a day on this.What are the steps to design the layout so that it will fit the TV screen? This is my xml file:\[code\]<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/RelativeLayout1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1" android:background="#FFFFFF" android:gravity="center" > <ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:contentDescription="@string/logimgdesc" android:src="http://stackoverflow.com/questions/11149087/@drawable/logo" /> <Button android:id="@+id/btnStart" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_marginRight="36dp" android:text="@string/start" /> <Button android:id="@+id/btnDownload" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_marginRight="36dp" android:text="@string/download" /> <Button android:id="@+id/btnStop" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/spyonme" android:layout_alignBottom="@+id/spyonme" android:layout_alignLeft="@+id/btnLoadFP" android:text="@string/stop" /></RelativeLayout>\[/code\]
 
Back
Top