diff options
author | Mert Tümer <merttumer7@gmail.com> | 2018-05-25 15:15:29 +0300 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-06-01 04:30:20 +0200 |
commit | ea62d02cedd7b6c90ebcb0ce73e30dc6ddd342c8 (patch) | |
tree | 43d2dec03a8c33ae785c31755639b5af8d810ff5 /android/source/res | |
parent | Added Storage permission handling on the Android Viewer (diff) | |
download | core-ea62d02cedd7b6c90ebcb0ce73e30dc6ddd342c8.tar.gz core-ea62d02cedd7b6c90ebcb0ce73e30dc6ddd342c8.zip |
[Pardus] tdf#106371 ability to insert/delete tables Android Viewer
This patch is sponsored by ULAKBIM/PARDUS project.
Signed-off-by: Mert Tümer <merttumer7@gmail.com>
Change-Id: I2d160b53ad432be96deb6f13c0d91a6053744dc8
Reviewed-on: https://gerrit.libreoffice.org/54803
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'android/source/res')
-rw-r--r-- | android/source/res/drawable/ic_grid_off_black_24dp.xml | 9 | ||||
-rw-r--r-- | android/source/res/drawable/ic_grid_on_black_24dp.xml | 9 | ||||
-rw-r--r-- | android/source/res/layout/number_picker.xml | 130 | ||||
-rw-r--r-- | android/source/res/layout/toolbar_bottom.xml | 20 | ||||
-rw-r--r-- | android/source/res/values/strings.xml | 16 |
5 files changed, 184 insertions, 0 deletions
diff --git a/android/source/res/drawable/ic_grid_off_black_24dp.xml b/android/source/res/drawable/ic_grid_off_black_24dp.xml new file mode 100644 index 000000000000..7cf3c950cc4b --- /dev/null +++ b/android/source/res/drawable/ic_grid_off_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="M8,4v1.45l2,2L10,4h4v4h-3.45l2,2L14,10v1.45l2,2L16,10h4v4h-3.45l2,2L20,16v1.45l2,2L22,4c0,-1.1 -0.9,-2 -2,-2L4.55,2l2,2L8,4zM16,4h4v4h-4L16,4zM1.27,1.27L0,2.55l2,2L2,20c0,1.1 0.9,2 2,2h15.46l2,2 1.27,-1.27L1.27,1.27zM10,12.55L11.45,14L10,14v-1.45zM4,6.55L5.45,8L4,8L4,6.55zM8,20L4,20v-4h4v4zM8,14L4,14v-4h3.45l0.55,0.55L8,14zM14,20h-4v-4h3.45l0.55,0.54L14,20zM16,20v-1.46L17.46,20L16,20z"/> +</vector> diff --git a/android/source/res/drawable/ic_grid_on_black_24dp.xml b/android/source/res/drawable/ic_grid_on_black_24dp.xml new file mode 100644 index 000000000000..b2ff9e5be07b --- /dev/null +++ b/android/source/res/drawable/ic_grid_on_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,2L4,2c-1.1,0 -2,0.9 -2,2v16c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM8,20L4,20v-4h4v4zM8,14L4,14v-4h4v4zM8,8L4,8L4,4h4v4zM14,20h-4v-4h4v4zM14,14h-4v-4h4v4zM14,8h-4L10,4h4v4zM20,20h-4v-4h4v4zM20,14h-4v-4h4v4zM20,8h-4L16,4h4v4z"/> +</vector> diff --git a/android/source/res/layout/number_picker.xml b/android/source/res/layout/number_picker.xml new file mode 100644 index 000000000000..51463926c70f --- /dev/null +++ b/android/source/res/layout/number_picker.xml @@ -0,0 +1,130 @@ +<?xml version="1.0" encoding="utf-8"?> +<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:padding="15dp" + android:id="@+id/numberpickerLayout"> + + <TextView + android:id="@+id/textView11" + android:layout_width="wrap_content" + android:layout_height="30dp" + android:layout_marginStart="8dp" + android:layout_marginLeft="8dp" + android:layout_marginTop="8dp" + android:text="Rows:" + android:gravity="center" + android:textSize="18sp" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/number_picker_rows_positive" + android:layout_width="30dp" + android:layout_height="30dp" + android:layout_marginEnd="8dp" + android:layout_marginRight="8dp" + android:layout_marginTop="8dp" + android:background="@drawable/image_button_background" + android:clickable="true" + android:gravity="center" + android:text="+" + android:textSize="18sp" + android:textStyle="bold" + app:layout_constraintEnd_toEndOf="@+id/numberpickerLayout" + app:layout_constraintTop_toTopOf="@+id/numberpickerLayout" /> + + <TextView + android:id="@+id/number_picker_row_count" + android:layout_width="30dp" + android:layout_height="30dp" + android:layout_marginEnd="8dp" + android:layout_marginStart="8dp" + android:layout_marginTop="8dp" + android:text="3" + android:gravity="center" + android:textSize="18sp" + android:textStyle="bold" + app:layout_constraintEnd_toStartOf="@+id/number_picker_rows_positive" + app:layout_constraintStart_toEndOf="@+id/number_picker_rows_negative" + app:layout_constraintTop_toTopOf="@+id/numberpickerLayout" /> + + <TextView + android:id="@+id/number_picker_rows_negative" + android:layout_width="30dp" + android:layout_height="30dp" + android:layout_marginEnd="8dp" + android:layout_marginStart="8dp" + android:layout_marginTop="8dp" + android:text="-" + android:gravity="center" + android:textSize="18sp" + android:textStyle="bold" + android:clickable="true" + android:background="@drawable/image_button_background" + app:layout_constraintEnd_toEndOf="@+id/numberpickerLayout" + app:layout_constraintStart_toStartOf="@+id/numberpickerLayout" + app:layout_constraintTop_toTopOf="@+id/numberpickerLayout" /> + + <TextView + android:id="@+id/textView12" + android:layout_width="wrap_content" + android:layout_height="30dp" + android:layout_marginStart="8dp" + android:layout_marginLeft="8dp" + android:layout_marginTop="24dp" + android:text="Columns:" + android:gravity="center" + android:textSize="18sp" + app:layout_constraintStart_toStartOf="@+id/numberpickerLayout" + app:layout_constraintTop_toBottomOf="@+id/textView11" /> + + <TextView + android:id="@+id/number_picker_cols_negative" + android:layout_width="30dp" + android:layout_height="30dp" + android:layout_marginEnd="8dp" + android:layout_marginStart="8dp" + android:layout_marginTop="24dp" + android:text="-" + android:gravity="center" + android:textSize="18sp" + android:textStyle="bold" + android:background="@drawable/image_button_background" + android:clickable="true" + app:layout_constraintEnd_toEndOf="@+id/numberpickerLayout" + app:layout_constraintStart_toStartOf="@+id/numberpickerLayout" + app:layout_constraintTop_toBottomOf="@+id/number_picker_rows_negative" /> + + <TextView + android:id="@+id/number_picker_col_count" + android:layout_width="30dp" + android:layout_height="30dp" + android:layout_marginEnd="8dp" + android:layout_marginStart="8dp" + android:layout_marginTop="24dp" + android:gravity="center" + android:text="3" + android:textSize="18sp" + android:textStyle="bold" + app:layout_constraintEnd_toStartOf="@+id/number_picker_cols_positive" + app:layout_constraintStart_toEndOf="@+id/number_picker_cols_negative" + app:layout_constraintTop_toBottomOf="@+id/number_picker_row_count" /> + + <TextView + android:id="@+id/number_picker_cols_positive" + android:layout_width="30dp" + android:layout_height="30dp" + android:layout_marginEnd="8dp" + android:layout_marginRight="8dp" + android:layout_marginTop="24dp" + android:text="+" + android:gravity="center" + android:textSize="18sp" + android:textStyle="bold" + android:clickable="true" + android:background="@drawable/image_button_background" + app:layout_constraintEnd_toEndOf="@+id/numberpickerLayout" + app:layout_constraintTop_toBottomOf="@+id/number_picker_rows_positive" /> +</android.support.constraint.ConstraintLayout>
\ 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 d944b2713f2a..d1476a57fa57 100644 --- a/android/source/res/layout/toolbar_bottom.xml +++ b/android/source/res/layout/toolbar_bottom.xml @@ -366,6 +366,26 @@ android:paddingBottom="12dp" android:paddingTop="12dp" app:srcCompat="@drawable/ic_folder_black_24dp" /> + + <ImageButton + android:id="@+id/button_insert_table" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="0.25" + android:background="@drawable/image_button_background" + android:paddingBottom="12dp" + android:paddingTop="12dp" + app:srcCompat="@drawable/ic_grid_on_black_24dp" /> + + <ImageButton + android:id="@+id/button_delete_table" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="0.25" + android:background="@drawable/image_button_background" + android:paddingBottom="12dp" + android:paddingTop="12dp" + app:srcCompat="@drawable/ic_grid_off_black_24dp" /> </LinearLayout> </ScrollView> </LinearLayout> diff --git a/android/source/res/values/strings.xml b/android/source/res/values/strings.xml index 2a4ca0ab4e21..cbbce88d158c 100644 --- a/android/source/res/values/strings.xml +++ b/android/source/res/values/strings.xml @@ -179,5 +179,21 @@ <string name="action_cut">Cut</string> <string name="action_back">Back</string> <string name="action_text_copied">Text copied to the clipboard</string> + <string name="insert_table">Insert table</string> + <string name="select_insert_options">Select insert options:</string> + <string name="select_delete_options">Select delete options:</string> + + <string-array name="insertrowscolumns"> + <item>Insert Rows Before</item> + <item>Insert Rows After</item> + <item>Insert Columns Before</item> + <item>Insert Columns After</item> + <item>Insert Table</item> + </string-array> + <string-array name="deleterowcolumns"> + <item>Delete Rows</item> + <item>Delete Columns</item> + <item>Delete Table</item> + </string-array> </resources> |