Skip to content
Browse files

fix display not expanding on tablets

  • Loading branch information...
1 parent 9d51f8a commit 224223c00edc0c95149ba57899295f2170a403d0 @Xlythe committed
Showing with 87 additions and 103 deletions.
  1. +44 −51 res/layout-sw600dp-land/main.xml
  2. +43 −52 res/layout-sw600dp-port/main.xml
View
95 res/layout-sw600dp-land/main.xml
@@ -29,60 +29,53 @@
<LinearLayout
android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1"
- android:background="@android:color/transparent">
+ android:minHeight="@dimen/min_display_height"
+ android:layout_height="wrap_content"
+ android:background="@android:color/transparent"
+ android:orientation="horizontal">
+ <com.android2.calculator3.view.CalculatorDisplay
+ android:id="@+id/display"
+ android:layout_width="0dp"
+ android:layout_weight="1"
+ android:layout_height="match_parent"
+ maxDigits="@integer/max_digits"
+ >
- <LinearLayout
- android:layout_width="match_parent"
- android:minHeight="@dimen/min_display_height"
- android:layout_height="wrap_content"
- android:orientation="horizontal">
- <com.android2.calculator3.view.CalculatorDisplay
- android:id="@+id/display"
- android:layout_width="0dp"
- android:layout_weight="1"
+ <com.android2.calculator3.view.ScrollableDisplay
+ style="@style/display_style" />
+ <com.android2.calculator3.view.ScrollableDisplay
+ style="@style/display_style" />
+
+ </com.android2.calculator3.view.CalculatorDisplay>
+ <ImageButton android:id="@+id/overflow_menu"
+ android:layout_width="48dip"
+ android:layout_height="match_parent"
+ android:src="@drawable/ic_menu_overflow"
+ android:background="@android:color/transparent"
+ android:layout_marginLeft="8dip"
+ android:visibility="gone"
+ android:contentDescription="@null"/>
+ <FrameLayout
+ android:layout_width="100dip"
+ android:layout_height="match_parent">
+ <Button
+ android:id="@+id/clear"
+ android:text="@string/clear"
+ style="@style/btn_clear"
+ android:layout_width="match_parent"
android:layout_height="match_parent"
- maxDigits="@integer/max_digits"
- >
-
- <com.android2.calculator3.view.ScrollableDisplay
- style="@style/display_style" />
- <com.android2.calculator3.view.ScrollableDisplay
- style="@style/display_style" />
-
- </com.android2.calculator3.view.CalculatorDisplay>
- <ImageButton android:id="@+id/overflow_menu"
- android:layout_width="48dip"
+ android:paddingLeft="5dip"
+ android:paddingRight="5dip" />
+ <ImageButton
+ android:id="@+id/del"
+ android:src="@drawable/calc_clear_symbol"
+ style="@style/btn_clear"
+ android:layout_width="match_parent"
android:layout_height="match_parent"
- android:src="@drawable/ic_menu_overflow"
- android:background="@android:color/transparent"
- android:layout_marginLeft="8dip"
- android:visibility="gone"
- android:contentDescription="@null"/>
- <FrameLayout
- android:layout_width="100dip"
- android:layout_height="match_parent">
- <Button
- android:id="@+id/clear"
- android:text="@string/clear"
- style="@style/btn_clear"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:paddingLeft="5dip"
- android:paddingRight="5dip" />
- <ImageButton
- android:id="@+id/del"
- android:src="@drawable/calc_clear_symbol"
- style="@style/btn_clear"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:paddingLeft="5dip"
- android:paddingRight="5dip"
- android:contentDescription="@null" />
- </FrameLayout>
- </LinearLayout>
- <include layout="@layout/history_panel"/>
+ android:paddingLeft="5dip"
+ android:paddingRight="5dip"
+ android:contentDescription="@null" />
+ </FrameLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
View
95 res/layout-sw600dp-port/main.xml
@@ -28,62 +28,53 @@
android:paddingRight="@dimen/left_right_padding" >
<LinearLayout
android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1"
+ android:minHeight="@dimen/min_display_height"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
android:background="@android:color/transparent">
+ <com.android2.calculator3.view.CalculatorDisplay
+ android:id="@+id/display"
+ android:layout_width="0dp"
+ android:layout_weight="1"
+ android:layout_height="match_parent"
+ maxDigits="@integer/max_digits"
+ >
- <LinearLayout
- android:layout_width="match_parent"
- android:minHeight="@dimen/min_display_height"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:background="@android:color/transparent">
-
- <com.android2.calculator3.view.CalculatorDisplay
- android:id="@+id/display"
- android:layout_width="0dp"
- android:layout_weight="1"
+ <com.android2.calculator3.view.ScrollableDisplay
+ style="@style/display_style" />
+ <com.android2.calculator3.view.ScrollableDisplay
+ style="@style/display_style" />
+
+ </com.android2.calculator3.view.CalculatorDisplay>
+ <ImageButton android:id="@+id/overflow_menu"
+ android:layout_width="48dip"
+ android:layout_height="match_parent"
+ android:src="@drawable/ic_menu_overflow"
+ android:background="@android:color/transparent"
+ android:layout_marginLeft="8dip"
+ android:visibility="gone"
+ android:contentDescription="@null"/>
+ <FrameLayout
+ android:layout_width="100dip"
+ android:layout_height="match_parent">
+ <Button
+ android:id="@+id/clear"
+ android:text="@string/clear"
+ style="@style/btn_clear"
+ android:layout_width="match_parent"
android:layout_height="match_parent"
- maxDigits="@integer/max_digits"
- >
-
- <com.android2.calculator3.view.ScrollableDisplay
- style="@style/display_style" />
- <com.android2.calculator3.view.ScrollableDisplay
- style="@style/display_style" />
-
- </com.android2.calculator3.view.CalculatorDisplay>
- <ImageButton android:id="@+id/overflow_menu"
- android:layout_width="48dip"
+ android:paddingLeft="5dip"
+ android:paddingRight="5dip" />
+ <ImageButton
+ android:id="@+id/del"
+ android:src="@drawable/calc_clear_symbol"
+ style="@style/btn_clear"
+ android:layout_width="match_parent"
android:layout_height="match_parent"
- android:src="@drawable/ic_menu_overflow"
- android:background="@android:color/transparent"
- android:layout_marginLeft="8dip"
- android:visibility="gone"
- android:contentDescription="@null"/>
- <FrameLayout
- android:layout_width="100dip"
- android:layout_height="match_parent">
- <Button
- android:id="@+id/clear"
- android:text="@string/clear"
- style="@style/btn_clear"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:paddingLeft="5dip"
- android:paddingRight="5dip" />
- <ImageButton
- android:id="@+id/del"
- android:src="@drawable/calc_clear_symbol"
- style="@style/btn_clear"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:paddingLeft="5dip"
- android:paddingRight="5dip"
- android:contentDescription="@null" />
- </FrameLayout>
-
- </LinearLayout>
+ android:paddingLeft="5dip"
+ android:paddingRight="5dip"
+ android:contentDescription="@null" />
+ </FrameLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"

0 comments on commit 224223c

Please sign in to comment.
Something went wrong with that request. Please try again.