diff options
-rw-r--r-- | android/res/drawable-ldpi/ic_reflow.png | bin | 0 -> 962 bytes | |||
-rw-r--r-- | android/res/drawable-mdpi/ic_reflow.png | bin | 0 -> 1255 bytes | |||
-rw-r--r-- | android/res/layout/buttons.xml | 12 | ||||
-rw-r--r-- | android/src/com/artifex/mupdfdemo/MuPDFActivity.java | 11 |
4 files changed, 21 insertions, 2 deletions
diff --git a/android/res/drawable-ldpi/ic_reflow.png b/android/res/drawable-ldpi/ic_reflow.png Binary files differnew file mode 100644 index 00000000..5be6372b --- /dev/null +++ b/android/res/drawable-ldpi/ic_reflow.png diff --git a/android/res/drawable-mdpi/ic_reflow.png b/android/res/drawable-mdpi/ic_reflow.png Binary files differnew file mode 100644 index 00000000..c6b72be9 --- /dev/null +++ b/android/res/drawable-mdpi/ic_reflow.png diff --git a/android/res/layout/buttons.xml b/android/res/layout/buttons.xml index 6764dfd1..2d5732f1 100644 --- a/android/res/layout/buttons.xml +++ b/android/res/layout/buttons.xml @@ -55,12 +55,22 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" - android:layout_toLeftOf="@+id/searchButton" + android:layout_toLeftOf="@+id/reflowButton" android:contentDescription="@string/search_document" android:background="@drawable/button" android:src="@drawable/ic_list" /> <ImageButton + android:id="@+id/reflowButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_toLeftOf="@+id/searchButton" + android:contentDescription="@string/search_document" + android:background="@drawable/button" + android:src="@drawable/ic_reflow" /> + + <ImageButton android:id="@+id/searchButton" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/android/src/com/artifex/mupdfdemo/MuPDFActivity.java b/android/src/com/artifex/mupdfdemo/MuPDFActivity.java index 61b24170..f627cc0f 100644 --- a/android/src/com/artifex/mupdfdemo/MuPDFActivity.java +++ b/android/src/com/artifex/mupdfdemo/MuPDFActivity.java @@ -17,6 +17,7 @@ import android.content.SharedPreferences; import android.content.res.Resources; import android.database.Cursor; import android.graphics.Color; +import android.graphics.PorterDuff; import android.graphics.RectF; import android.net.Uri; import android.os.Bundle; @@ -103,6 +104,7 @@ public class MuPDFActivity extends Activity private TextView mPageNumberView; private TextView mInfoView; private ImageButton mSearchButton; + private ImageButton mReflowButton; private ImageButton mSelectButton; private ImageButton mCancelSelectButton; private ImageButton mCopySelectButton; @@ -590,7 +592,13 @@ public class MuPDFActivity extends Activity // Activate the search-preparing button mSearchButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { - //searchModeOn(); + searchModeOn(); + } + }); + + // Activate the reflow button + mReflowButton.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { toggleReflow(); } }); @@ -963,6 +971,7 @@ public class MuPDFActivity extends Activity mPageNumberView = (TextView)mButtonsView.findViewById(R.id.pageNumber); mInfoView = (TextView)mButtonsView.findViewById(R.id.info); mSearchButton = (ImageButton)mButtonsView.findViewById(R.id.searchButton); + mReflowButton = (ImageButton)mButtonsView.findViewById(R.id.reflowButton); mSelectButton = (ImageButton)mButtonsView.findViewById(R.id.selectButton); mCancelSelectButton = (ImageButton)mButtonsView.findViewById(R.id.cancelSelectButton); mCopySelectButton = (ImageButton)mButtonsView.findViewById(R.id.copySelectButton); |