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 | |
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')
-rw-r--r-- | android/source/res/drawable/ic_arrow_back_black_24dp.xml | 9 | ||||
-rw-r--r-- | android/source/res/drawable/ic_done_all_white_12dp.xml | 10 | ||||
-rw-r--r-- | android/source/res/drawable/ic_done_white_12dp.xml | 10 | ||||
-rw-r--r-- | android/source/res/drawable/ic_keyboard_backspace_black_24dp.xml | 9 | ||||
-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 | ||||
-rw-r--r-- | android/source/res/values/colors.xml | 25 |
9 files changed, 164 insertions, 0 deletions
diff --git a/android/source/res/drawable/ic_arrow_back_black_24dp.xml b/android/source/res/drawable/ic_arrow_back_black_24dp.xml new file mode 100644 index 000000000000..beafea3959eb --- /dev/null +++ b/android/source/res/drawable/ic_arrow_back_black_24dp.xml @@ -0,0 +1,9 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="#FF000000" + android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/> +</vector> diff --git a/android/source/res/drawable/ic_done_all_white_12dp.xml b/android/source/res/drawable/ic_done_all_white_12dp.xml new file mode 100644 index 000000000000..8c17c93e4e98 --- /dev/null +++ b/android/source/res/drawable/ic_done_all_white_12dp.xml @@ -0,0 +1,10 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="12dp" + android:height="12dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:strokeColor="#231F20" + android:fillColor="#FFFFFFFF" + android:pathData="M18,7l-1.41,-1.41 -6.34,6.34 1.41,1.41L18,7zM22.24,5.59L11.66,16.17 7.48,12l-1.41,1.41L11.66,19l12,-12 -1.42,-1.41zM0.41,13.41L6,19l1.41,-1.41L1.83,12 0.41,13.41z"/> +</vector>
\ No newline at end of file diff --git a/android/source/res/drawable/ic_done_white_12dp.xml b/android/source/res/drawable/ic_done_white_12dp.xml new file mode 100644 index 000000000000..ed73ad37f0b3 --- /dev/null +++ b/android/source/res/drawable/ic_done_white_12dp.xml @@ -0,0 +1,10 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="12dp" + android:height="12dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:strokeColor="#231F20" + android:fillColor="#FFFF" + android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"/> +</vector>
\ No newline at end of file diff --git a/android/source/res/drawable/ic_keyboard_backspace_black_24dp.xml b/android/source/res/drawable/ic_keyboard_backspace_black_24dp.xml new file mode 100644 index 000000000000..827cde0056cd --- /dev/null +++ b/android/source/res/drawable/ic_keyboard_backspace_black_24dp.xml @@ -0,0 +1,9 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="#FF000000" + android:pathData="M21,11H6.83l3.58,-3.59L9,6l-6,6 6,6 1.41,-1.41L6.83,13H21z"/> +</vector> 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 diff --git a/android/source/res/values/colors.xml b/android/source/res/values/colors.xml index 44f16b2c65d7..3defb9a3ea83 100644 --- a/android/source/res/values/colors.xml +++ b/android/source/res/values/colors.xml @@ -98,5 +98,30 @@ <color name="handle_color">#26a69a</color> <color name="button_selected_background">#33000000</color> + <color name="fontBlack">#000000</color> + <color name="fontDarkRed">#990000</color> + <color name="fontRed">#FF0000</color> + <color name="fontOrange">#FF8000</color> + <color name="fontYellow">#FFFF00</color> + <color name="fontGreen">#00FF00</color> + <color name="fontCyan">#00FFFF</color> + <color name="fontLightBlue">#0080FF</color> + <color name="fontBlue">#0000FF</color> + <color name="fontPurple">#990099</color> + <color name="fontPink">#FF00FF</color> + + <integer-array name="fontcolors"> + <item>@color/fontBlack</item> + <item>@color/fontDarkRed</item> + <item>@color/fontRed</item> + <item>@color/fontOrange</item> + <item>@color/fontYellow</item> + <item>@color/fontGreen</item> + <item>@color/fontCyan</item> + <item>@color/fontLightBlue</item> + <item>@color/fontBlue</item> + <item>@color/fontPurple</item> + <item>@color/fontPink</item> + </integer-array> </resources> |