Tablet UI fixes
This commit is contained in:
parent
362189f6ad
commit
1154cae8e5
@ -110,7 +110,7 @@ public abstract class AbstractCalculatorPlotFragment extends CalculatorFragment
|
||||
super.onCreate(in);
|
||||
|
||||
if (isPaneFragment()) {
|
||||
this.bgColor = getResources().getColor(R.color.cpp_pane_background);
|
||||
this.bgColor = getResources().getColor(R.color.cpp_pane_bg);
|
||||
} else {
|
||||
this.bgColor = getResources().getColor(android.R.color.transparent);
|
||||
}
|
||||
|
35
android-app/src/main/res/drawable/material_blue_button.xml
Normal file
35
android-app/src/main/res/drawable/material_blue_button.xml
Normal file
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright 2013 serso aka se.solovyev
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
~
|
||||
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~ Contact details
|
||||
~
|
||||
~ Email: se.solovyev@gmail.com
|
||||
~ Site: http://se.solovyev.org
|
||||
-->
|
||||
|
||||
<selector xmlns:a="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item a:state_pressed="true" a:drawable="@drawable/metro_button_pressed" />
|
||||
|
||||
<item>
|
||||
<shape>
|
||||
<solid a:color="@color/cpp_material_blue" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</selector>
|
35
android-app/src/main/res/drawable/material_button_dark.xml
Normal file
35
android-app/src/main/res/drawable/material_button_dark.xml
Normal file
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright 2013 serso aka se.solovyev
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
~
|
||||
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~ Contact details
|
||||
~
|
||||
~ Email: se.solovyev@gmail.com
|
||||
~ Site: http://se.solovyev.org
|
||||
-->
|
||||
|
||||
<selector xmlns:a="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item a:state_pressed="true" a:drawable="@drawable/metro_button_pressed" />
|
||||
|
||||
<item>
|
||||
<shape>
|
||||
<solid a:color="@color/cpp_metro_button" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</selector>
|
34
android-app/src/main/res/drawable/material_button_light.xml
Normal file
34
android-app/src/main/res/drawable/material_button_light.xml
Normal file
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright 2013 serso aka se.solovyev
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
~
|
||||
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~ Contact details
|
||||
~
|
||||
~ Email: se.solovyev@gmail.com
|
||||
~ Site: http://se.solovyev.org
|
||||
-->
|
||||
<selector xmlns:a="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item a:state_pressed="true" a:drawable="@drawable/metro_button_pressed" />
|
||||
|
||||
<item>
|
||||
<shape>
|
||||
<solid a:color="@color/cpp_metro_button_light" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</selector>
|
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright 2013 serso aka se.solovyev
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
~
|
||||
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~ Contact details
|
||||
~
|
||||
~ Email: se.solovyev@gmail.com
|
||||
~ Site: http://se.solovyev.org
|
||||
-->
|
||||
|
||||
<selector xmlns:a="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item a:state_pressed="true" a:drawable="@drawable/metro_button_pressed" />
|
||||
|
||||
<item>
|
||||
<shape>
|
||||
<solid a:color="@color/cpp_material_light" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</selector>
|
@ -21,6 +21,6 @@
|
||||
-->
|
||||
|
||||
<shape xmlns:a="http://schemas.android.com/apk/res/android">
|
||||
<solid a:color="@color/cpp_pane_background"/>
|
||||
<solid a:color="@color/cpp_pane_bg"/>
|
||||
<corners a:radius="@dimen/cpp_button_corner"/>
|
||||
</shape>
|
26
android-app/src/main/res/drawable/pane_light.xml
Normal file
26
android-app/src/main/res/drawable/pane_light.xml
Normal file
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright 2013 serso aka se.solovyev
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
~
|
||||
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~ Contact details
|
||||
~
|
||||
~ Email: se.solovyev@gmail.com
|
||||
~ Site: http://se.solovyev.org
|
||||
-->
|
||||
|
||||
<shape xmlns:a="http://schemas.android.com/apk/res/android">
|
||||
<solid a:color="@color/cpp_pane_bg_light"/>
|
||||
<corners a:radius="@dimen/cpp_button_corner"/>
|
||||
</shape>
|
@ -23,6 +23,7 @@
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
|
||||
xmlns:c="http://schemas.android.com/apk/res-auto"
|
||||
a:layout_width="match_parent"
|
||||
a:layout_height="match_parent"
|
||||
a:orientation="vertical"
|
||||
@ -56,7 +57,7 @@
|
||||
a:layout_marginBottom="10dp"
|
||||
a:background="?attr/cpp_main_bg">
|
||||
|
||||
<org.solovyev.android.calculator.drag.DirectionDragButton xmlns:c="http://schemas.android.com/apk/res-auto"
|
||||
<org.solovyev.android.calculator.drag.DirectionDragButton
|
||||
a:id="@+id/wizard_mode_button"
|
||||
a:text="7"
|
||||
c:directionTextScale="0.5"
|
||||
|
@ -28,6 +28,7 @@
|
||||
<attr name="cpp_button_style_control_image" format="reference"/>
|
||||
<attr name="cpp_button_style_operation" format="reference"/>
|
||||
<attr name="cpp_main_bg" format="reference"/>
|
||||
<attr name="cpp_pane_bg" format="reference"/>
|
||||
<attr name="cpp_fab_bg" format="reference"/>
|
||||
<attr name="cpp_toolbar_theme" format="reference"/>
|
||||
|
||||
|
@ -33,14 +33,13 @@
|
||||
<color name="cpp_button_text_ce">#ffffffff</color>
|
||||
<color name="cpp_selected_angle_unit_text">#ffffff99</color>
|
||||
<color name="cpp_main_bg">#101010</color>
|
||||
<color name="cpp_main_light_bg">#fff6f1ef</color>
|
||||
<color name="cpp_main_bg_light">#fff6f1ef</color>
|
||||
<color name="cpp_wizard_primary">#FAFAFA</color>
|
||||
<color name="cpp_wizard_secondary">#9E9E9E</color>
|
||||
<color name="cpp_wizard_overscroll">#FAFAFA</color>
|
||||
<color name="cpp_wizard_button_normal">#424242</color>
|
||||
<color name="cpp_wizard_button_disabled">#616161</color>
|
||||
<color name="cpp_wizard_button_pressed">#757575</color>
|
||||
<color name="cpp_pane_background">@color/cpp_material_grey</color>
|
||||
<color name="cpp_metro_button_dark">#ff000000</color>
|
||||
<color name="cpp_metro_button">@color/cpp_material_grey</color>
|
||||
<color name="cpp_metro_button_light">@color/cpp_material_grey_light</color>
|
||||
@ -61,4 +60,8 @@
|
||||
<color name="cpp_material_grey_light">#393939</color>
|
||||
<color name="cpp_material_actionbar">@color/cpp_material_grey</color>
|
||||
<color name="cpp_material_actionbar_light">@color/cpp_material_grey_light</color>
|
||||
|
||||
<color name="cpp_pane_bg">@color/cpp_material_grey</color>
|
||||
<color name="cpp_pane_bg_light">#ffeae5e3</color>
|
||||
|
||||
</resources>
|
@ -22,7 +22,7 @@
|
||||
|
||||
<dimen name="cpp_display_text_size">25sp</dimen>
|
||||
<dimen name="cpp_editor_text_size">25sp</dimen>
|
||||
<dimen name="cpp_pane_margin">5dp</dimen>
|
||||
<dimen name="cpp_pane_margin">3dp</dimen>
|
||||
<dimen name="cpp_pane_padding">0dp</dimen>
|
||||
<dimen name="cpp_li_text_size">16sp</dimen>
|
||||
<dimen name="cpp_li_secondary_text_size">14sp</dimen>
|
||||
|
@ -22,20 +22,6 @@
|
||||
|
||||
<resources>
|
||||
|
||||
<style name="cpp_window_title">
|
||||
<item name="android:singleLine">true</item>
|
||||
<item name="android:textAppearance">@style/cpp_text_appearance_window_title</item>
|
||||
<item name="android:shadowColor">#BB000000</item>
|
||||
<item name="android:shadowRadius">2.75</item>
|
||||
</style>
|
||||
|
||||
<style name="cpp_text_appearance_window_title">
|
||||
<item name="android:textColor">#fff</item>
|
||||
<item name="android:textSize">14sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="cpp_default_text_size">
|
||||
<item name="android:textSize">@dimen/cpp_text_size</item>
|
||||
</style>
|
||||
@ -193,7 +179,7 @@
|
||||
</style>
|
||||
|
||||
<style name="CppFragmentTitle">
|
||||
<item name="android:textColor">@android:color/white</item>
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
<item name="android:textSize">@dimen/cpp_fragment_title_text_size</item>
|
||||
<item name="android:paddingLeft">@dimen/cpp_pane_margin</item>
|
||||
</style>
|
||||
@ -201,8 +187,10 @@
|
||||
<style name="CppPaneStyle">
|
||||
<item name="android:layout_marginLeft">@dimen/cpp_pane_margin</item>
|
||||
<item name="android:layout_marginTop">@dimen/cpp_pane_margin</item>
|
||||
<item name="android:layout_marginRight">@dimen/cpp_pane_margin</item>
|
||||
<item name="android:layout_marginBottom">@dimen/cpp_pane_margin</item>
|
||||
<item name="android:padding">@dimen/cpp_pane_padding</item>
|
||||
<item name="android:background">@drawable/pane_background</item>
|
||||
<item name="android:background">?attr/cpp_pane_bg</item>
|
||||
</style>
|
||||
|
||||
<style name="CppPaneStyle.Transparent" parent="CppPaneStyle">
|
||||
@ -276,7 +264,6 @@
|
||||
<style name="CppListView">
|
||||
<item name="android:id">@android:id/list</item>
|
||||
<item name="android:dividerHeight">1px</item>
|
||||
<item name="android:divider">@color/cpp_list_divider</item>
|
||||
<item name="android:cacheColorHint">@android:color/transparent</item>
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
|
@ -37,6 +37,7 @@
|
||||
<item name="android:actionBarStyle">@style/CppActionBar</item>
|
||||
|
||||
<item name="cpp_main_bg">@color/cpp_main_bg</item>
|
||||
<item name="cpp_pane_bg">@drawable/pane</item>
|
||||
<item name="cpp_fab_bg">@color/cpp_material_grey</item>
|
||||
<item name="android:textColorPrimary">@color/cpp_text</item>
|
||||
<item name="android:textColorPrimaryInverse">@color/cpp_text_error</item>
|
||||
@ -57,13 +58,14 @@
|
||||
<item name="android:windowCloseOnTouchOutside">false</item>
|
||||
|
||||
<item name="cpp_main_bg">@color/cpp_main_bg</item>
|
||||
<item name="cpp_pane_bg">@drawable/pane</item>
|
||||
<item name="cpp_fab_bg">@color/cpp_material_grey</item>
|
||||
<item name="android:textColorPrimary">@color/cpp_text</item>
|
||||
<item name="android:textColorPrimaryInverse">@color/cpp_text_error</item>
|
||||
</style>
|
||||
|
||||
<style name="Cpp.Theme.Light" parent="@style/Theme.AppCompat.Light.DarkActionBar">
|
||||
<item name="android:windowBackground">@color/cpp_main_light_bg</item>
|
||||
<item name="android:windowBackground">@color/cpp_main_bg_light</item>
|
||||
|
||||
<item name="colorPrimary">@color/cpp_material_light</item>
|
||||
<item name="android:colorPrimary">@color/cpp_material_light</item>
|
||||
@ -75,14 +77,15 @@
|
||||
<item name="actionBarStyle">@style/CppActionBar.Light</item>
|
||||
<item name="android:actionBarStyle">@style/CppActionBar.Light</item>
|
||||
|
||||
<item name="cpp_main_bg">@color/cpp_main_light_bg</item>
|
||||
<item name="cpp_main_bg">@color/cpp_main_bg_light</item>
|
||||
<item name="cpp_pane_bg">@drawable/pane_light</item>
|
||||
<item name="cpp_fab_bg">@color/cpp_material_light</item>
|
||||
<item name="android:textColorPrimary">@color/cpp_text_inverse</item>
|
||||
<item name="android:textColorPrimaryInverse">@color/cpp_text_error_inverse</item>
|
||||
</style>
|
||||
|
||||
<style name="Cpp.Theme.Light.Dialog" parent="@style/Theme.AppCompat.Light.Dialog">
|
||||
<item name="android:windowBackground">@color/cpp_main_light_bg</item>
|
||||
<item name="android:windowBackground">@color/cpp_main_bg_light</item>
|
||||
|
||||
<item name="colorPrimary">@color/cpp_material_light</item>
|
||||
<item name="android:colorPrimary">@color/cpp_material_light</item>
|
||||
@ -97,7 +100,8 @@
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowCloseOnTouchOutside">false</item>
|
||||
|
||||
<item name="cpp_main_bg">@color/cpp_main_light_bg</item>
|
||||
<item name="cpp_main_bg">@color/cpp_main_bg_light</item>
|
||||
<item name="cpp_pane_bg">@drawable/pane_light</item>
|
||||
<item name="cpp_fab_bg">@color/cpp_material_light</item>
|
||||
<item name="android:textColorPrimary">@color/cpp_text_inverse</item>
|
||||
<item name="android:textColorPrimaryInverse">@color/cpp_text_error_inverse</item>
|
||||
|
Loading…
Reference in New Issue
Block a user