cpp-137: Wrong padding in a pane on tablets

Fixes #137
This commit is contained in:
serso 2015-02-17 16:55:17 +01:00
parent 7498cc51bf
commit 496a1e9a79
6 changed files with 174 additions and 152 deletions

View File

@ -21,56 +21,58 @@
~ Email: se.solovyev@gmail.com ~ Email: se.solovyev@gmail.com
~ Site: http://se.solovyev.org ~ Site: http://se.solovyev.org
--> -->
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android" <LinearLayout
a:id="@+id/main_layout" a:id="@+id/main_layout"
a:orientation="vertical" style="@style/CppMain.Multipane"
style="@style/CppMain.Multipane"> xmlns:a="http://schemas.android.com/apk/res/android"
a:orientation="vertical">
<LinearLayout <LinearLayout
a:layout_height="0dp"
a:layout_width="match_parent" a:layout_width="match_parent"
a:layout_height="0dp"
a:layout_marginTop="@dimen/cpp_pane_margin"
a:layout_weight="3" a:layout_weight="3"
a:orientation="horizontal" a:baselineAligned="false"
a:baselineAligned="false"> a:orientation="horizontal">
<LinearLayout <LinearLayout
a:layout_height="match_parent"
a:layout_width="0dp" a:layout_width="0dp"
a:layout_height="match_parent"
a:layout_gravity="center"
a:layout_weight="1" a:layout_weight="1"
a:orientation="vertical" a:orientation="vertical">
a:layout_gravity="center">
<LinearLayout <LinearLayout
a:id="@+id/editorContainer" a:id="@+id/editorContainer"
a:layout_height="0dp" style="@style/CppPane.Multipane.Left"
a:layout_width="match_parent" a:layout_width="match_parent"
style="@style/CppPaneStyle" a:layout_height="0dp"
a:layout_weight="1"/> a:layout_weight="1"/>
<FrameLayout <FrameLayout
a:id="@+id/displayContainer" a:id="@+id/displayContainer"
a:layout_height="0dp" style="@style/CppPane.Multipane.Left"
a:layout_width="match_parent" a:layout_width="match_parent"
style="@style/CppPaneStyle" a:layout_height="0dp"
a:layout_weight="1"/> a:layout_weight="1"/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
a:id="@+id/main_second_pane" a:id="@+id/main_second_pane"
a:layout_height="match_parent" style="@style/CppPane.Multipane.Right"
a:layout_width="0dp" a:layout_width="0dp"
a:layout_height="match_parent"
a:layout_weight="1" a:layout_weight="1"
a:orientation="vertical" a:orientation="vertical"/>
style="@style/CppPaneStyle"/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
a:id="@+id/keyboardContainer" a:id="@+id/keyboardContainer"
a:layout_height="0dp" style="@style/CppPane.Transparent.Bottom"
a:layout_width="match_parent" a:layout_width="match_parent"
a:layout_weight="2" a:layout_height="0dp"
style="@style/CppPaneStyle.Transparent"/> a:layout_weight="2"/>
</LinearLayout> </LinearLayout>

View File

@ -21,56 +21,58 @@
~ Email: se.solovyev@gmail.com ~ Email: se.solovyev@gmail.com
~ Site: http://se.solovyev.org ~ Site: http://se.solovyev.org
--> -->
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android" <LinearLayout
a:id="@+id/main_layout" a:id="@+id/main_layout"
a:orientation="vertical" style="@style/CppMain.Multipane"
style="@style/CppMain.Multipane"> xmlns:a="http://schemas.android.com/apk/res/android"
a:orientation="vertical">
<LinearLayout <LinearLayout
a:layout_height="0dp"
a:layout_width="match_parent" a:layout_width="match_parent"
a:layout_height="0dp"
a:layout_marginTop="@dimen/cpp_pane_margin"
a:layout_weight="3" a:layout_weight="3"
a:orientation="horizontal" a:baselineAligned="false"
a:baselineAligned="false"> a:orientation="horizontal">
<LinearLayout <LinearLayout
a:layout_height="match_parent"
a:layout_width="0dp" a:layout_width="0dp"
a:layout_height="match_parent"
a:layout_gravity="center"
a:layout_weight="1" a:layout_weight="1"
a:orientation="vertical" a:orientation="vertical">
a:layout_gravity="center">
<LinearLayout <LinearLayout
a:id="@+id/editorContainer" a:id="@+id/editorContainer"
a:layout_height="0dp" style="@style/CppPane.Multipane.Left"
a:layout_width="match_parent" a:layout_width="match_parent"
style="@style/CppPaneStyle" a:layout_height="0dp"
a:layout_weight="3"/> a:layout_weight="3"/>
<FrameLayout <FrameLayout
a:id="@+id/displayContainer" a:id="@+id/displayContainer"
a:layout_height="0dp" style="@style/CppPane.Multipane.Left"
a:layout_width="match_parent" a:layout_width="match_parent"
style="@style/CppPaneStyle" a:layout_height="0dp"
a:layout_weight="1"/> a:layout_weight="1"/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
a:id="@+id/main_second_pane" a:id="@+id/main_second_pane"
a:layout_height="match_parent" style="@style/CppPane.Multipane.Right"
a:layout_width="0dp" a:layout_width="0dp"
a:layout_height="match_parent"
a:layout_weight="1" a:layout_weight="1"
a:orientation="vertical" a:orientation="vertical"/>
style="@style/CppPaneStyle"/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
a:id="@+id/keyboardContainer" a:id="@+id/keyboardContainer"
a:layout_height="0dp" style="@style/CppPane.Transparent.Bottom"
a:layout_width="match_parent" a:layout_width="match_parent"
a:layout_weight="2" a:layout_height="0dp"
style="@style/CppPaneStyle.Transparent"/> a:layout_weight="2"/>
</LinearLayout> </LinearLayout>

View File

@ -21,56 +21,59 @@
~ Email: se.solovyev@gmail.com ~ Email: se.solovyev@gmail.com
~ Site: http://se.solovyev.org ~ Site: http://se.solovyev.org
--> -->
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android" <LinearLayout
a:id="@+id/main_layout" a:id="@+id/main_layout"
a:orientation="vertical" style="@style/CppMain.Multipane"
style="@style/CppMain.Multipane"> xmlns:a="http://schemas.android.com/apk/res/android"
a:orientation="vertical">
<LinearLayout <LinearLayout
a:layout_height="0dp"
a:layout_width="match_parent" a:layout_width="match_parent"
a:layout_height="0dp"
a:layout_marginTop="@dimen/cpp_pane_margin"
a:layout_weight="5" a:layout_weight="5"
a:orientation="horizontal" a:baselineAligned="false"
a:baselineAligned="false"> a:orientation="horizontal">
<LinearLayout <LinearLayout
a:layout_height="match_parent"
a:layout_width="0dp" a:layout_width="0dp"
a:layout_height="match_parent"
a:layout_gravity="center"
a:layout_weight="1" a:layout_weight="1"
a:orientation="vertical" a:orientation="vertical">
a:layout_gravity="center">
<LinearLayout <LinearLayout
a:id="@+id/editorContainer" a:id="@+id/editorContainer"
a:layout_height="0dp" style="@style/CppPane.Multipane.Left"
a:layout_width="match_parent" a:layout_width="match_parent"
style="@style/CppPaneStyle" a:layout_height="0dp"
a:layout_weight="3"/> a:layout_weight="3"
a:orientation="horizontal"/>
<FrameLayout <FrameLayout
a:id="@+id/displayContainer" a:id="@+id/displayContainer"
a:layout_height="0dp" style="@style/CppPane.Multipane.Left"
a:layout_width="match_parent" a:layout_width="match_parent"
style="@style/CppPaneStyle" a:layout_height="0dp"
a:layout_weight="1"/> a:layout_weight="1"/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
a:id="@+id/main_second_pane" a:id="@+id/main_second_pane"
a:layout_height="match_parent" style="@style/CppPane.Multipane.Right"
a:layout_width="0dp" a:layout_width="0dp"
a:layout_height="match_parent"
a:layout_weight="1" a:layout_weight="1"
a:orientation="vertical" a:orientation="vertical"/>
style="@style/CppPaneStyle"/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
a:id="@+id/keyboardContainer" a:id="@+id/keyboardContainer"
a:layout_height="0dp" style="@style/CppPane.Transparent.Bottom"
a:layout_width="match_parent" a:layout_width="match_parent"
a:layout_weight="1" a:layout_height="0dp"
style="@style/CppPaneStyle.Transparent"/> a:layout_weight="1"/>
</LinearLayout> </LinearLayout>

View File

@ -21,56 +21,58 @@
~ Email: se.solovyev@gmail.com ~ Email: se.solovyev@gmail.com
~ Site: http://se.solovyev.org ~ Site: http://se.solovyev.org
--> -->
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android" <LinearLayout
a:id="@+id/main_layout" a:id="@+id/main_layout"
a:orientation="vertical" style="@style/CppMain.Multipane"
style="@style/CppMain.Multipane"> xmlns:a="http://schemas.android.com/apk/res/android"
a:orientation="vertical">
<LinearLayout <LinearLayout
a:layout_height="0dp"
a:layout_width="match_parent" a:layout_width="match_parent"
a:layout_height="0dp"
a:layout_marginTop="@dimen/cpp_pane_margin"
a:layout_weight="3" a:layout_weight="3"
a:orientation="horizontal" a:baselineAligned="false"
a:baselineAligned="false"> a:orientation="horizontal">
<LinearLayout <LinearLayout
a:layout_height="match_parent"
a:layout_width="0dp" a:layout_width="0dp"
a:layout_height="match_parent"
a:layout_gravity="center"
a:layout_weight="1" a:layout_weight="1"
a:orientation="vertical" a:orientation="vertical">
a:layout_gravity="center">
<LinearLayout <LinearLayout
a:id="@+id/editorContainer" a:id="@+id/editorContainer"
a:layout_height="0dp" style="@style/CppPane.Multipane.Left"
a:layout_width="match_parent" a:layout_width="match_parent"
style="@style/CppPaneStyle" a:layout_height="0dp"
a:layout_weight="4"/> a:layout_weight="4"/>
<FrameLayout <FrameLayout
a:id="@+id/displayContainer" a:id="@+id/displayContainer"
a:layout_height="0dp" style="@style/CppPane.Multipane.Left"
a:layout_width="match_parent" a:layout_width="match_parent"
style="@style/CppPaneStyle" a:layout_height="0dp"
a:layout_weight="1"/> a:layout_weight="1"/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
a:id="@+id/main_second_pane" a:id="@+id/main_second_pane"
a:layout_height="match_parent" style="@style/CppPane.Multipane.Right"
a:layout_width="0dp" a:layout_width="0dp"
a:layout_height="match_parent"
a:layout_weight="1" a:layout_weight="1"
a:orientation="vertical" a:orientation="vertical"/>
style="@style/CppPaneStyle"/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
a:id="@+id/keyboardContainer" a:id="@+id/keyboardContainer"
a:layout_height="0dp" style="@style/CppPane.Transparent.Bottom"
a:layout_width="match_parent" a:layout_width="match_parent"
a:layout_weight="1" a:layout_height="0dp"
style="@style/CppPaneStyle.Transparent"/> a:layout_weight="1"/>
</LinearLayout> </LinearLayout>

View File

@ -22,8 +22,7 @@
<dimen name="cpp_display_text_size">25sp</dimen> <dimen name="cpp_display_text_size">25sp</dimen>
<dimen name="cpp_editor_text_size">25sp</dimen> <dimen name="cpp_editor_text_size">25sp</dimen>
<dimen name="cpp_pane_margin">3dp</dimen> <dimen name="cpp_pane_margin">2dp</dimen>
<dimen name="cpp_pane_padding">0dp</dimen>
<dimen name="cpp_li_text_size">16sp</dimen> <dimen name="cpp_li_text_size">16sp</dimen>
<dimen name="cpp_li_secondary_text_size">14sp</dimen> <dimen name="cpp_li_secondary_text_size">14sp</dimen>

View File

@ -187,19 +187,35 @@
<style name="CppFragmentTitle"> <style name="CppFragmentTitle">
<item name="android:textColor">?android:attr/textColorPrimary</item> <item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textSize">@dimen/cpp_fragment_title_text_size</item> <item name="android:textSize">@dimen/cpp_fragment_title_text_size</item>
<item name="android:paddingLeft">@dimen/cpp_pane_margin</item>
</style> </style>
<style name="CppPaneStyle"> <style name="CppPane.Multipane.Left" parent="CppPane.Multipane">
<item name="android:layout_marginLeft">0dp</item>
</style>
<style name="CppPane.Multipane.Right" parent="CppPane.Multipane">
<item name="android:layout_marginRight">0dp</item>
</style>
<style name="CppPane.Multipane" parent="CppPane">
<item name="android:padding">5dp</item>
<item name="android:layout_marginLeft">@dimen/cpp_pane_margin</item> <item name="android:layout_marginLeft">@dimen/cpp_pane_margin</item>
<item name="android:layout_marginTop">@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_marginRight">@dimen/cpp_pane_margin</item>
<item name="android:layout_marginBottom">@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">?attr/cpp_pane_bg</item>
</style> </style>
<style name="CppPaneStyle.Transparent" parent="CppPaneStyle"> <style name="CppPane">
<item name="android:padding">0dp</item>
<item name="android:background">?attr/cpp_pane_bg</item>
<item name="android:orientation">horizontal</item>
</style>
<style name="CppPane.Transparent.Bottom" parent="CppPane.Transparent">
<item name="android:layout_marginTop">@dimen/cpp_pane_margin</item>
</style>
<style name="CppPane.Transparent" parent="CppPane">
<item name="android:background">@android:color/transparent</item> <item name="android:background">@android:color/transparent</item>
<item name="android:padding">0dp</item> <item name="android:padding">0dp</item>
</style> </style>
@ -211,8 +227,8 @@
</style> </style>
<style name="CppMain.Multipane" parent="CppMain"> <style name="CppMain.Multipane" parent="CppMain">
<item name="android:paddingRight">@dimen/cpp_pane_padding</item> <item name="android:paddingRight">0dp</item>
<item name="android:paddingBottom">@dimen/cpp_pane_padding</item> <item name="android:paddingBottom">0dp</item>
</style> </style>
<style name="CppFragment"> <style name="CppFragment">
@ -275,9 +291,7 @@
<item name="android:layout_width">match_parent</item> <item name="android:layout_width">match_parent</item>
<item name="android:layout_weight">1</item> <item name="android:layout_weight">1</item>
<item name="android:fadingEdge">none</item> <item name="android:fadingEdge">none</item>
<item name="android:paddingLeft">@dimen/cpp_pane_padding</item> <item name="android:padding">0dp</item>
<item name="android:paddingRight">@dimen/cpp_pane_padding</item>
<item name="android:layout_marginBottom">@dimen/cpp_pane_padding</item>
</style> </style>
<style name="CppActionBar" parent="@style/Widget.AppCompat.ActionBar"> <style name="CppActionBar" parent="@style/Widget.AppCompat.ActionBar">