tdf#106317 bottom tabbar, grow/shrink font, insert line,rect
- added some initial implementation of the bottom tab-bar, which has 3 tabs - character, paragraph, insert - insert has not (completely) working insert line and rect shapes - add ability to shring/grow font as alternative to select its size Change-Id: If039f985403a8155d1e011953043f2979b4bfa91
This commit is contained in:
16
android/source/res/drawable/ic_grow.xml
Normal file
16
android/source/res/drawable/ic_grow.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<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:pathData="m17,9.219 l0,-4.313 2.281,2.313 0.719,-0.719 -3.281,-3.281 -0.219,-0.219 -0.219,0.219 -3.281,3.281 0.719,0.719 2.281,-2.313 0,4.313 1,0z"
|
||||
android:fillAlpha="1"
|
||||
android:strokeColor="#00000000"
|
||||
android:fillColor="#1d99f3"/>
|
||||
<path
|
||||
android:pathData="m8.911,5 l-3.315,9.594 -0.123,0.406 -1.473,4 1.657,0 1.627,-4.438 5.432,0 1.627,4.438 1.657,0 -1.473,-4 -0.123,-0.406 -3.315,-9.594 -0.215,0 -1.749,0 -0.215,0zM10.015,6.938 L12.194,13.281 7.806,13.281 10.015,6.938z"
|
||||
android:fillAlpha="1"
|
||||
android:strokeColor="#00000000"
|
||||
android:fillColor="#4d4d4d"/>
|
||||
</vector>
|
12
android/source/res/drawable/ic_line.xml
Normal file
12
android/source/res/drawable/ic_line.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<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:pathData="M4,11h16v2h-16z"
|
||||
android:fillAlpha="1"
|
||||
android:strokeColor="#00000000"
|
||||
android:fillColor="#4d4d4d"
|
||||
android:strokeWidth="2"/>
|
||||
</vector>
|
13
android/source/res/drawable/ic_rect.xml
Normal file
13
android/source/res/drawable/ic_rect.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<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:pathData="M4,6h16v12h-16z"
|
||||
android:fillAlpha="0.99"
|
||||
android:strokeColor="#00000000"
|
||||
android:fillColor="#4d4d4d"
|
||||
android:strokeWidth="4"
|
||||
android:strokeAlpha="0.99"/>
|
||||
</vector>
|
16
android/source/res/drawable/ic_shrink.xml
Normal file
16
android/source/res/drawable/ic_shrink.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<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:pathData="m16,14.781 l0,4.313 -2.281,-2.313 -0.719,0.719 3.281,3.281 0.219,0.219 0.219,-0.219 3.281,-3.281 -0.719,-0.719 -2.281,2.313 0,-4.313 -1,0z"
|
||||
android:fillAlpha="1"
|
||||
android:strokeColor="#00000000"
|
||||
android:fillColor="#1d99f3"/>
|
||||
<path
|
||||
android:pathData="m8.91,5 l-3.314,9.594 -0.123,0.406 -1.473,4 1.658,0 1.625,-4.438c-0.004,-0.001 7.111,0.004 7.111,0.004l-3.305,-9.566 -0.215,0 -1.75,0zM10.016,6.938 L12.195,13.281 7.805,13.281z"
|
||||
android:fillAlpha="1"
|
||||
android:strokeColor="#00000000"
|
||||
android:fillColor="#4d4d4d"/>
|
||||
</vector>
|
@@ -1,191 +1,320 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:elevation="3dp"
|
||||
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">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/formatting_toolbar"
|
||||
<LinearLayout
|
||||
android:id="@+id/formatting_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TabHost
|
||||
android:id="@+id/toolbarTabHost"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_bold"
|
||||
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"
|
||||
android:src="@drawable/ic_format_bold"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_italic"
|
||||
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"
|
||||
android:src="@drawable/ic_format_italic"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_underlined"
|
||||
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"
|
||||
android:src="@drawable/ic_format_underlined"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_strikethrough"
|
||||
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"
|
||||
android:src="@drawable/ic_format_strikethrough"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_insertFormatListNumbering"
|
||||
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"
|
||||
android:src="@drawable/ic_format_numbering"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_insertFormatListBullets"
|
||||
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"
|
||||
android:src="@drawable/ic_format_bullets"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_align_left"
|
||||
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"
|
||||
android:src="@drawable/ic_format_align_left"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_align_center"
|
||||
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"
|
||||
android:src="@drawable/ic_format_align_center"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_align_right"
|
||||
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"
|
||||
android:src="@drawable/ic_format_align_right"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_align_justify"
|
||||
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"
|
||||
android:src="@drawable/ic_format_align_justify"/>
|
||||
</LinearLayout>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/font_name_spinner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:minHeight="50dip"/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/font_size_spinner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:minHeight="50dip"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/search_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="vertical">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/search_string"
|
||||
<TabWidget
|
||||
android:id="@android:id/tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2"/>
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_search_up"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.6"
|
||||
android:background="@drawable/image_button_background"
|
||||
android:padding="10dp"
|
||||
android:src="@drawable/ic_search_direction_down"/>
|
||||
</TabWidget>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_search_down"
|
||||
<FrameLayout
|
||||
android:id="@android:id/tabcontent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.6"
|
||||
android:background="@drawable/image_button_background"
|
||||
android:padding="10dp"
|
||||
android:src="@drawable/ic_search_direction_up"/>
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tab_character"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/toolbar_height">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.25"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_bold"
|
||||
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"
|
||||
android:src="@drawable/ic_format_bold" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_italic"
|
||||
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"
|
||||
android:src="@drawable/ic_format_italic" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_underlined"
|
||||
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"
|
||||
android:src="@drawable/ic_format_underlined" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_strikethrough"
|
||||
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"
|
||||
android:src="@drawable/ic_format_strikethrough" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/font_name_spinner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:minHeight="50dip" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/font_size_spinner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.80"
|
||||
android:minHeight="50dip" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_font_shrink"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.10"
|
||||
android:background="@drawable/image_button_background"
|
||||
android:paddingBottom="12dp"
|
||||
android:paddingTop="12dp"
|
||||
android:src="@drawable/ic_shrink" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_font_grow"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.10"
|
||||
android:background="@drawable/image_button_background"
|
||||
android:paddingBottom="12dp"
|
||||
android:paddingTop="12dp"
|
||||
android:src="@drawable/ic_grow" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tab_paragraph"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/toolbar_height">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_align_left"
|
||||
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"
|
||||
android:src="@drawable/ic_format_align_left" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_align_center"
|
||||
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"
|
||||
android:src="@drawable/ic_format_align_center" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_align_right"
|
||||
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"
|
||||
android:src="@drawable/ic_format_align_right" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_align_justify"
|
||||
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"
|
||||
android:src="@drawable/ic_format_align_justify" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_insertFormatListNumbering"
|
||||
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"
|
||||
android:src="@drawable/ic_format_numbering" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_insertFormatListBullets"
|
||||
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"
|
||||
android:src="@drawable/ic_format_bullets" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tab_insert"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/toolbar_height">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.25"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_insert_line"
|
||||
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"
|
||||
android:src="@drawable/ic_line" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_insert_rect"
|
||||
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"
|
||||
android:src="@drawable/ic_rect" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</TabHost>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/search_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/search_string"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.2"
|
||||
android:inputType="" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_search_up"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.6"
|
||||
android:background="@drawable/image_button_background"
|
||||
android:padding="10dp"
|
||||
android:src="@drawable/ic_search_direction_down" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_search_down"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.6"
|
||||
android:background="@drawable/image_button_background"
|
||||
android:padding="10dp"
|
||||
android:src="@drawable/ic_search_direction_up" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -8,4 +8,5 @@
|
||||
<dimen name="file_icon_margin_end">8dp</dimen>
|
||||
<dimen name="list_item_margin">8dp</dimen>
|
||||
<dimen name="file_icon_width">32dp</dimen>
|
||||
<dimen name="toolbar_height">256dp</dimen>
|
||||
</resources>
|
||||
|
@@ -15,7 +15,6 @@ import org.libreoffice.kit.Document;
|
||||
mContext = context;
|
||||
|
||||
mContext.findViewById(R.id.button_insertFormatListBullets).setOnClickListener(this);
|
||||
|
||||
mContext.findViewById(R.id.button_insertFormatListNumbering).setOnClickListener(this);
|
||||
|
||||
mContext.findViewById(R.id.button_bold).setOnClickListener(this);
|
||||
@@ -27,6 +26,12 @@ import org.libreoffice.kit.Document;
|
||||
mContext.findViewById(R.id.button_align_center).setOnClickListener(this);
|
||||
mContext.findViewById(R.id.button_align_right).setOnClickListener(this);
|
||||
mContext.findViewById(R.id.button_align_justify).setOnClickListener(this);
|
||||
|
||||
mContext.findViewById(R.id.button_insert_line).setOnClickListener(this);
|
||||
mContext.findViewById(R.id.button_insert_rect).setOnClickListener(this);
|
||||
|
||||
mContext.findViewById(R.id.button_font_shrink).setOnClickListener(this);
|
||||
mContext.findViewById(R.id.button_font_grow).setOnClickListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -73,6 +78,18 @@ import org.libreoffice.kit.Document;
|
||||
case R.id.button_align_justify:
|
||||
LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:JustifyPara"));
|
||||
break;
|
||||
case R.id.button_insert_line:
|
||||
LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Line"));
|
||||
break;
|
||||
case R.id.button_insert_rect:
|
||||
LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Rect"));
|
||||
break;
|
||||
case R.id.button_font_shrink:
|
||||
LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Shrink"));
|
||||
break;
|
||||
case R.id.button_font_grow:
|
||||
LOKitShell.sendEvent(new LOEvent(LOEvent.UNO_COMMAND, ".uno:Grow"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -23,6 +23,7 @@ import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TabHost;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.libreoffice.overlay.DocumentOverlay;
|
||||
@@ -95,6 +96,7 @@ public class LibreOfficeMainActivity extends AppCompatActivity {
|
||||
private boolean isFormattingToolbarOpen = false;
|
||||
private boolean isSearchToolbarOpen = false;
|
||||
private boolean isDocumentChanged = false;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
Log.w(LOGTAG, "onCreate..");
|
||||
@@ -185,6 +187,24 @@ public class LibreOfficeMainActivity extends AppCompatActivity {
|
||||
mDocumentOverlay = new DocumentOverlay(this, layerView);
|
||||
|
||||
mToolbarController.setupToolbars();
|
||||
|
||||
TabHost host = (TabHost) findViewById(R.id.toolbarTabHost);
|
||||
host.setup();
|
||||
|
||||
TabHost.TabSpec spec = host.newTabSpec("Character");
|
||||
spec.setContent(R.id.tab_character);
|
||||
spec.setIndicator("Character");
|
||||
host.addTab(spec);
|
||||
|
||||
spec = host.newTabSpec("Paragraph");
|
||||
spec.setContent(R.id.tab_paragraph);
|
||||
spec.setIndicator("Paragraph");
|
||||
host.addTab(spec);
|
||||
|
||||
spec = host.newTabSpec("Insert");
|
||||
spec.setContent(R.id.tab_insert);
|
||||
spec.setIndicator("Insert");
|
||||
host.addTab(spec);
|
||||
}
|
||||
|
||||
public RectF getCurrentCursorPosition() {
|
||||
|
Reference in New Issue
Block a user