couple more UI changes
This commit is contained in:
parent
f5d7c3e829
commit
9f07615348
|
@ -1,9 +1,9 @@
|
||||||
package calculator.simplemobiletools.com.simple_calculator;
|
package calculator.simplemobiletools.com.simple_calculator;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
import android.appwidget.AppWidgetManager;
|
import android.appwidget.AppWidgetManager;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import butterknife.Bind;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
import butterknife.OnClick;
|
import butterknife.OnClick;
|
||||||
|
|
||||||
public class MyWidgetConfigure extends AppCompatActivity {
|
public class MyWidgetConfigure extends Activity {
|
||||||
@Bind(R.id.btn_reset) Button resetBtn;
|
@Bind(R.id.btn_reset) Button resetBtn;
|
||||||
private int widgetId;
|
private int widgetId;
|
||||||
|
|
||||||
|
|
|
@ -6,31 +6,29 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context="calculator.simplemobiletools.com.simple_calculator.MainActivity">
|
tools:context="calculator.simplemobiletools.com.simple_calculator.MainActivity">
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/result"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@color/dark_grey"
|
|
||||||
android:gravity="right"
|
|
||||||
android:lines="1"
|
|
||||||
android:paddingBottom="@dimen/result_padding"
|
|
||||||
android:paddingLeft="@dimen/activity_margin"
|
|
||||||
android:paddingRight="@dimen/activity_margin"
|
|
||||||
android:paddingTop="@dimen/result_padding"
|
|
||||||
android:text="0"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
android:textSize="@dimen/display_text_size"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/result"
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/result"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1.8"
|
||||||
|
android:background="@color/dark_grey"
|
||||||
|
android:gravity="center_vertical|right"
|
||||||
|
android:lines="1"
|
||||||
|
android:paddingLeft="@dimen/activity_margin"
|
||||||
|
android:paddingRight="@dimen/activity_margin"
|
||||||
|
android:text="0"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="@dimen/display_text_size"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="2"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
@ -78,7 +76,7 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="2"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
@ -117,7 +115,7 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="2"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
@ -156,7 +154,7 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="2"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
@ -195,7 +193,7 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="2"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
android:layout_marginBottom="80dp"
|
android:layout_marginBottom="80dp"
|
||||||
android:layout_marginLeft="@dimen/activity_margin"
|
android:layout_marginLeft="@dimen/activity_margin"
|
||||||
android:layout_marginRight="@dimen/activity_margin"
|
android:layout_marginRight="@dimen/activity_margin"
|
||||||
android:layout_marginTop="@dimen/activity_margin">
|
android:layout_marginTop="80dp">
|
||||||
|
|
||||||
<include
|
<include
|
||||||
android:id="@+id/config_calc"
|
android:id="@+id/config_calc"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<resources>
|
<resources>
|
||||||
<dimen name="activity_margin">16dp</dimen>
|
<dimen name="activity_margin">16dp</dimen>
|
||||||
<dimen name="result_padding">32dp</dimen>
|
<dimen name="result_padding">64dp</dimen>
|
||||||
<dimen name="config_text_size">18sp</dimen>
|
<dimen name="config_text_size">18sp</dimen>
|
||||||
<dimen name="button_text_size">28sp</dimen>
|
<dimen name="button_text_size">28sp</dimen>
|
||||||
<dimen name="display_text_size">36sp</dimen>
|
<dimen name="display_text_size">36sp</dimen>
|
||||||
|
|
|
@ -22,12 +22,6 @@
|
||||||
<item name="android:windowContentOverlay">@null</item>
|
<item name="android:windowContentOverlay">@null</item>
|
||||||
<item name="android:backgroundDimEnabled">false</item>
|
<item name="android:backgroundDimEnabled">false</item>
|
||||||
<item name="android:textColor">@android:color/white</item>
|
<item name="android:textColor">@android:color/white</item>
|
||||||
<item name="android:actionBarStyle">@style/MyWidgetConfigActionBar</item>
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="MyWidgetConfigActionBar" parent="Widget.AppCompat.Light.ActionBar">
|
|
||||||
<item name="android:background">@color/colorPrimary</item>
|
|
||||||
<item name="background">@color/colorPrimary</item>
|
|
||||||
</style>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue