android - Different table layout when orientation is changed -
i have table layout severals rows , 2 textviews in it.
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" android:paddingbottom="@dimen/activity_vertical_margin" tools:context="com.example.blackess.smstestas.mystatisticsactivity"> <tablelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:stretchcolumns="1"> <tablerow> <textview android:text="celkem uskutečněných hovorů:" android:padding="3dip" /> <textview android:id="@+id/allcalls" android:gravity="right" android:padding="3dip" /> </tablerow> <tablerow> <textview android:text="celkem odesláno sms:" android:padding="3dip" /> <textview android:id="@+id/allsms" android:gravity="right" android:padding="3dip" /> </tablerow> <tablerow> <textview android:text="délka všech hovorů:" android:padding="3dip" /> <textview android:id="@+id/alllenghtcalls" android:gravity="right" android:padding="3dip" /> </tablerow> <tablerow> <textview android:text="celkový počet odeslaných sms:" android:padding="3dip" /> <textview android:id="@+id/allcountsms" android:gravity="right" android:padding="3dip" /> </tablerow> <tablerow> <textview android:text="nejdelší hovor:" android:padding="3dip" /> <textview android:id="@+id/longestcall" android:gravity="right" android:padding="3dip" /> </tablerow> <tablerow> <textview android:text="nejdelší sms:" android:padding="3dip" /> <textview android:id="@+id/longestsms" android:gravity="right" android:padding="3dip" /> </tablerow> <tablerow> <textview android:text="nejvolanější číslo:" android:padding="3dip" /> <textview android:id="@+id/mostcalled" android:gravity="right" android:padding="3dip" /> </tablerow> <tablerow> <textview android:text="nejčastější příjemce zpráv:" android:padding="3dip" /> <textview android:id="@+id/mostsmsed" android:gravity="right" android:padding="3dip" /> </tablerow> </tablelayout> </relativelayout>
i´m setting every single second textview value. when have phone in horizontal position looks good, in clasic mode can see few digits of value. how can fix it? question: how can let table layout fill relative layout let rows spread out on screen. have them on top of screen.
create layout-port folder in res folder of app. copy xml , paste layout-port folder. there can adjust dimensions of xml more freely without corrupting landscape xml. rename original layout folder layout-land.
Comments
Post a Comment