diff options
author | Mert Tumer <merttumer@outlook.com> | 2017-05-19 23:06:01 +0300 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2017-08-16 16:28:17 +0200 |
commit | a149042c120d46f6121d2fe85584de2e5860b064 (patch) | |
tree | 5047a7a0d90c74e21a5057419b5540c6b008065e /android/source/res/layout | |
parent | 7299bdf02746d23de98d3237e47eba365a9657a5 (diff) |
Ability to change Font Color and added a new Color Picker on Android Viewer
Change-Id: I1d22749a446e451196f0819322cb04ed7d7befae
Reviewed-on: https://gerrit.libreoffice.org/37840
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'android/source/res/layout')
-rw-r--r-- | android/source/res/layout/activity_main.xml | 1 | ||||
-rw-r--r-- | android/source/res/layout/colorbox.xml | 15 | ||||
-rw-r--r-- | android/source/res/layout/toolbar_bottom.xml | 29 | ||||
-rw-r--r-- | android/source/res/layout/toolbar_color_picker.xml | 56 |
4 files changed, 101 insertions, 0 deletions
diff --git a/android/source/res/layout/activity_main.xml b/android/source/res/layout/activity_main.xml index fb5ba1ef7d32..e157e23454de 100644 --- a/android/source/res/layout/activity_main.xml +++ b/android/source/res/layout/activity_main.xml @@ -86,6 +86,7 @@ </LinearLayout> <include layout="@layout/toolbar_bottom"/> + <include layout="@layout/toolbar_color_picker"/> <RelativeLayout android:id="@+id/loadingPanel" diff --git a/android/source/res/layout/colorbox.xml b/android/source/res/layout/colorbox.xml new file mode 100644 index 000000000000..2c3366e663c8 --- /dev/null +++ b/android/source/res/layout/colorbox.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + + <ImageButton + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="35dp" + android:id="@+id/fontColorBox" + android:clickable="true" + android:scaleType="fitCenter" + /> + +</RelativeLayout>
\ No newline at end of file diff --git a/android/source/res/layout/toolbar_bottom.xml b/android/source/res/layout/toolbar_bottom.xml index 5ad9ffb1a982..5e172f620314 100644 --- a/android/source/res/layout/toolbar_bottom.xml +++ b/android/source/res/layout/toolbar_bottom.xml @@ -168,6 +168,35 @@ app:srcCompat="@drawable/ic_superscript" /> </LinearLayout> + + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:id="@+id/font_color_picker" + android:padding="10dp"> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Font Color" + android:paddingBottom="12dp" + android:paddingTop="12dp" + android:textSize="14dp" + android:gravity="center_vertical" + android:textColor="@color/fontBlack" + android:layout_alignParentLeft="true" + + /> + <ImageButton + android:id="@+id/font_color_picker_button" + android:layout_width="24dp" + android:layout_height="24dp" + android:gravity="center_vertical" + android:paddingBottom="12dp" + android:paddingTop="12dp" + android:layout_alignParentRight="true" + /> + + </RelativeLayout> </LinearLayout> </ScrollView> diff --git a/android/source/res/layout/toolbar_color_picker.xml b/android/source/res/layout/toolbar_color_picker.xml new file mode 100644 index 000000000000..2e2aed41abf9 --- /dev/null +++ b/android/source/res/layout/toolbar_color_picker.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="utf-8"?> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/toolbar_color_picker" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:background="@color/toolbar_background" + android:elevation="3dp" + android:orientation="vertical" + app:popupTheme="@style/LibreOfficeTheme.Toolbar" + app:theme="@style/LibreOfficeTheme.Toolbar" + tools:showIn="@layout/activity_main" + app:layout_behavior="android.support.design.widget.BottomSheetBehavior" + app:behavior_hideable="true" + app:behavior_peekHeight="0dp"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="10dp" + android:orientation="vertical"> + <ImageButton + android:id="@+id/button_go_back_color_picker" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@drawable/ic_arrow_back_black_24dp" + android:background="@drawable/image_button_background" + android:layout_marginBottom="10dp"/> + + <android.support.v7.widget.RecyclerView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:id="@+id/fontColorView" + > + + </android.support.v7.widget.RecyclerView> + + <android.support.v7.widget.RecyclerView + android:layout_width="match_parent" + android:layout_height="match_parent" + android:id="@+id/fontColorViewSub" + android:layout_marginTop="20dp" + android:layout_below="@id/fontColorView" + android:layout_alignParentBottom="true"> + + </android.support.v7.widget.RecyclerView> + + + </LinearLayout> + + + +</LinearLayout>
\ No newline at end of file |