Calculator onscreen added

This commit is contained in:
Sergey Solovyev
2012-11-22 00:24:17 +04:00
parent 0a35201c80
commit ddbb9b3bef
18 changed files with 733 additions and 353 deletions

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:layout_width="match_parent"
a:layout_height="30dp">
<LinearLayout a:id="@+id/onscreen_header_buttons"
a:layout_width="wrap_content"
a:layout_height="match_parent"
a:layout_alignParentRight="true">
<Button a:id="@+id/onscreen_fold_button"
style="@style/onscreen_header_button_style"
a:text="_"/>
<Button a:id="@+id/onscreen_minimize_button"
style="@style/onscreen_header_button_style"
a:text="_"/>
<Button a:id="@+id/onscreen_close_button"
style="@style/onscreen_header_button_style"
a:text="x"/>
</LinearLayout>
<TextView a:id="@+id/onscreen_title"
a:text="@string/c_app_name"
a:layout_width="match_parent"
a:layout_height="match_parent"
a:layout_toLeftOf="@id/onscreen_header_buttons"/>
</RelativeLayout>

View File

@@ -4,9 +4,9 @@
a:orientation="vertical"
style="@style/cpp_widget_main_layout_style">
<include layout="@layout/overlay_header"/>
<include layout="@layout/onscreen_header"/>
<LinearLayout a:id="@+id/overlay_content"
<LinearLayout a:id="@+id/onscreen_content"
a:orientation="vertical"
a:layout_width="match_parent"
a:layout_height="match_parent">
@@ -39,6 +39,6 @@
a:layout_height="0dp"/>
</LinearLayout>
<include layout="@layout/overlay_footer"/>
<include layout="@layout/onscreen_footer"/>
</LinearLayout>

View File

@@ -1,36 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:layout_width="match_parent"
a:layout_height="30dp">
<LinearLayout a:id="@+id/overlay_header_buttons"
a:layout_width="wrap_content"
a:layout_height="match_parent"
a:layout_alignParentRight="true">
<Button a:id="@+id/overlay_hide_button"
a:layout_width="wrap_content"
a:layout_height="match_parent"
a:layout_weight="0"
a:padding="6dp"
style="@style/widget_metro_control_button_style"
a:text="_"/>
<Button a:id="@+id/overlay_close_button"
a:layout_width="wrap_content"
a:layout_height="match_parent"
a:layout_weight="0"
a:padding="6dp"
style="@style/widget_metro_control_button_style"
a:text="x"/>
</LinearLayout>
<TextView a:id="@+id/overlay_title"
a:text="@string/c_app_name"
a:layout_width="match_parent"
a:layout_height="match_parent"
a:layout_toLeftOf="@id/overlay_header_buttons"/>
</RelativeLayout>

View File

@@ -269,5 +269,6 @@
<string name="c_app_widget_3x4_name">Калькулятор++ Виджет (3x4)</string>
<string name="c_app_widget_4x4_name">Калькулятор++ Виджет (4x4)</string>
<string name="c_app_widget_4x5_name">Калькулятор++ Виджет (4x5)</string>
<string name="open_onscreen_calculator">Нажмите чтобы открыть калькулятор поверх всех приложений</string>
</resources>

View File

@@ -25,6 +25,8 @@
<dimen name="cpp_widget_display_text_size">25sp</dimen>
<dimen name="cpp_widget_margin">6dp</dimen>
<dimen name="cpp_onscreen_header_button_text_size">10dp</dimen>
<!--only for not multipane-->
<dimen name="cpp_editor_padding">5dp</dimen>
<dimen name="cpp_display_padding">3dp</dimen>

View File

@@ -270,5 +270,6 @@
<string name="c_app_widget_3x4_name">Calculator++ Widget (3x4)</string>
<string name="c_app_widget_4x4_name">Calculator++ Widget (4x4)</string>
<string name="c_app_widget_4x5_name">Calculator++ Widget (4x5)</string>
<string name="open_onscreen_calculator">Click to open on-screen calculator</string>
</resources>

View File

@@ -86,7 +86,7 @@
<item name="android:layout_width">match_parent</item>
</style>
<style name="cpp_overlay_main_layout_style" parent="cpp_default_main_layout_style">
<style name="cpp_onscreen_main_layout_style" parent="cpp_default_main_layout_style">
<item name="android:layout_height">400dp</item>
<item name="android:layout_width">250dp</item>
</style>

View File

@@ -12,6 +12,14 @@
<item name="android:background">@drawable/metro_button_light</item>
</style>
<style name="onscreen_header_button_style" parent="metro_control_button_style">
<item name="android:layout_width">30dp</item>
<item name="android:layout_height">30dp</item>
<item name="android:layout_weight">0</item>
<item name="android:padding">0dp</item>
<item name="android:textSize">@dimen/cpp_onscreen_header_button_text_size</item>
</style>
<style name="widget_metro_control_button_style" parent="metro_control_button_style">
<item name="android:textSize">@dimen/cpp_widget_keyboard_button_text_size</item>
</style>