Permalink
Browse files

animated historybar, tablet ui tweaks

formatting tweaks, disable going back to basic in settings
  • Loading branch information...
1 parent a0bd7b1 commit e6b0399332a0a617925b0975caa50a5d7d6b6c73 @Xlythe committed Sep 17, 2012
View
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android2.calculator3"
- android:versionCode="14"
- android:versionName="1.5.4"
+ android:versionCode="16"
+ android:versionName="1.7"
android:installLocation="auto">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="16"/>
<application android:label="@string/app_name" android:icon="@mipmap/ic_launcher_calculator">
- <activity android:name=".Calculator"
+ <activity android:name=".Calculator"
android:theme="@android:style/Theme.Holo.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -22,83 +22,74 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="#ff000000"
- android:id="@+id/window">
+ android:background="@color/background">
<LinearLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="2"
- >
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1.5" >
+ <com.android2.calculator3.CalculatorDisplay
+ android:id="@+id/display"
+ android:layout_width="0dp"
+ android:layout_weight="5"
+ android:layout_height="match_parent"
+ maxDigits="@integer/max_digits">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <com.android2.calculator3.CalculatorDisplay
- android:id="@+id/display"
- android:layout_width="0dp"
- android:layout_weight="5"
+ <com.android2.calculator3.CalculatorEditText
+ style="@style/display_style" />
+ <com.android2.calculator3.CalculatorEditText
+ style="@style/display_style" />
+
+ </com.android2.calculator3.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="0dp"
+ android:layout_weight="1"
+ android:layout_height="match_parent">
+ <!-- marginRight has to be 0 to catch border-touch -->
+ <com.android2.calculator3.ColorButton
+ android:id="@+id/clear"
+ android:text="@string/clear"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginRight="0dp"
+ android:textSize="15dp"
+ style="@style/button_style"
+ />
+ <!-- marginRight has to be 0 to catch border-touch -->
+ <com.android2.calculator3.ColorButton
+ android:id="@+id/del"
+ android:text="@string/del"
+ android:layout_width="match_parent"
android:layout_height="match_parent"
- maxDigits="@integer/max_digits">
-
- <com.android2.calculator3.CalculatorEditText
- style="@style/display_style" />
- <com.android2.calculator3.CalculatorEditText
- style="@style/display_style" />
-
- </com.android2.calculator3.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="0dp"
- android:layout_weight="1"
- android:layout_height="match_parent">
- <!-- marginRight has to be 0 to catch border-touch -->
- <com.android2.calculator3.ColorButton
- android:id="@+id/clear"
- android:text="@string/clear"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginRight="0dp"
- android:textSize="15dp"
- style="@style/button_style"
- />
- <!-- marginRight has to be 0 to catch border-touch -->
- <com.android2.calculator3.ColorButton
- android:id="@+id/del"
- android:text="@string/del"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginRight="0dp"
- android:textSize="15dp"
- style="@style/button_style"
- />
- </FrameLayout>
- </LinearLayout>
- <include layout="@layout/history_panel"/>
+ android:layout_marginRight="0dp"
+ android:textSize="15dp"
+ style="@style/button_style"
+ />
+ </FrameLayout>
</LinearLayout>
-
- <ImageButton
- android:id="@+id/pulldown"
- android:src="@drawable/pulldown_down"
- android:background="@android:color/transparent"
- android:layout_width="match_parent"
- android:layout_height="21dp"
- android:paddingTop="4dp"
- android:paddingBottom="4dp"
- android:contentDescription="@null"
- android:scaleType="fitXY" />
-
- <com.android2.calculator3.CalculatorViewPager
- android:id="@+id/panelswitch"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="4"
- />
-
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="4">
+ <com.android2.calculator3.Slider
+ android:id="@+id/pulldown"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@color/background"
+ android:scrollbarThumbHorizontal="@drawable/pulldown_up" >
+ <include layout="@layout/history_panel" />
+ </com.android2.calculator3.Slider>
+ <com.android2.calculator3.CalculatorViewPager
+ android:id="@+id/panelswitch"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginTop="@integer/barHeight" />
+ </RelativeLayout>
</LinearLayout>
View
@@ -22,69 +22,43 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="#ff000000"
- android:id="@+id/window">
-
+ android:background="@color/background">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="3"
android:orientation="horizontal"
android:layout_gravity="center_vertical"
android:gravity="center_vertical">
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <com.android2.calculator3.CalculatorDisplay
- android:id="@+id/display"
- android:layout_width="0dip"
- android:layout_height="match_parent"
- android:layout_weight="1"
- maxDigits="@integer/max_digits">
-
- <com.android2.calculator3.CalculatorEditText
- style="@style/display_style" />
- <com.android2.calculator3.CalculatorEditText
- style="@style/display_style" />
-
- </com.android2.calculator3.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"/>
- </LinearLayout>
- <include layout="@layout/history_panel"/>
+ <com.android2.calculator3.CalculatorDisplay
+ android:id="@+id/display"
+ android:layout_width="0dip"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ maxDigits="@integer/max_digits">
+ <com.android2.calculator3.CalculatorEditText
+ style="@style/display_style" />
+ <com.android2.calculator3.CalculatorEditText
+ style="@style/display_style" />
+ </com.android2.calculator3.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"/>
</LinearLayout>
-
- <ImageButton
- android:id="@+id/pulldown"
- android:src="@drawable/pulldown_down"
- android:background="@android:color/transparent"
- android:layout_width="match_parent"
- android:layout_height="21dp"
- android:paddingTop="4dp"
- android:paddingBottom="4dp"
- android:contentDescription="@null"
- android:scaleType="fitXY" />
-
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
- android:layout_weight="1.5"
- >
-
+ android:layout_weight="1.5" >
<View
android:background="@drawable/btn_function"
android:layout_width="0dp"
android:layout_height="match_parent"
- android:layout_weight="3"
- />
-
+ android:layout_weight="3" />
<FrameLayout
android:layout_width="0dp"
android:layout_weight="1"
@@ -97,8 +71,7 @@
android:layout_height="match_parent"
android:layout_marginRight="0dp"
android:textSize="15dp"
- style="@style/button_style"
- />
+ style="@style/button_style" />
<!-- marginRight has to be 0 to catch border-touch -->
<com.android2.calculator3.ColorButton
android:id="@+id/del"
@@ -107,17 +80,25 @@
android:layout_height="match_parent"
android:layout_marginRight="0dp"
android:textSize="15dp"
- style="@style/button_style"
- />
+ style="@style/button_style" />
</FrameLayout>
-
</LinearLayout>
-
- <com.android2.calculator3.CalculatorViewPager
- android:id="@+id/panelswitch"
+ <RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
- android:layout_weight="10"
- />
-
+ android:layout_weight="10" >
+ <com.android2.calculator3.Slider
+ android:id="@+id/pulldown"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@color/background"
+ android:scrollbarThumbHorizontal="@drawable/pulldown_up" >
+ <include layout="@layout/history_panel" />
+ </com.android2.calculator3.Slider>
+ <com.android2.calculator3.CalculatorViewPager
+ android:id="@+id/panelswitch"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginTop="@integer/barHeight" />
+ </RelativeLayout>
</LinearLayout>
@@ -29,27 +29,24 @@
android:id="@+id/sin"
android:text="@string/sin"
style="@style/btn_function_cell_style" />
- <com.android2.calculator3.ColorButton
- android:id="@+id/ln"
- android:text="@string/ln"
- style="@style/btn_function_cell_style" />
- </LinearLayout>
- <LinearLayout
- style="@style/btn_row_style">
<com.android2.calculator3.ColorButton
android:id="@+id/cos"
android:text="@string/cos"
style="@style/btn_function_cell_style" />
<com.android2.calculator3.ColorButton
- android:id="@+id/lg"
- android:text="@string/lg"
+ android:id="@+id/tan"
+ android:text="@string/tan"
style="@style/btn_function_cell_style" />
</LinearLayout>
<LinearLayout
style="@style/btn_row_style">
<com.android2.calculator3.ColorButton
- android:id="@+id/tan"
- android:text="@string/tan"
+ android:id="@+id/lg"
+ android:text="@string/lg"
+ style="@style/btn_function_cell_style" />
+ <com.android2.calculator3.ColorButton
+ android:id="@+id/ln"
+ android:text="@string/ln"
style="@style/btn_function_cell_style" />
<com.android2.calculator3.ColorButton
android:id="@+id/e"
@@ -62,6 +59,10 @@
android:id="@+id/pi"
android:text="@string/pi"
style="@style/btn_function_cell_style" />
+ <com.android2.calculator3.ColorButton
+ android:id="@+id/i"
+ android:text="@string/i"
+ style="@style/btn_function_cell_style" />
<com.android2.calculator3.ColorButton
android:id="@+id/power"
android:text="@string/power"
@@ -77,13 +78,6 @@
android:id="@+id/sqrt"
android:text="@string/sqrt"
style="@style/btn_function_cell_style" />
- </LinearLayout>
- <LinearLayout
- style="@style/btn_row_style">
- <com.android2.calculator3.ColorButton
- android:id="@+id/i"
- android:text="@string/i"
- style="@style/btn_function_cell_style" />
<com.android2.calculator3.ColorButton
android:id="@+id/percentage"
android:text="@string/percentage"
Oops, something went wrong.

0 comments on commit e6b0399

Please sign in to comment.