summaryrefslogtreecommitdiff
path: root/android/source/src
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-11-29 09:15:25 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2023-11-30 12:17:07 +0100
commit322f8e8cb7d103a6666ceb212d43929aab2f111e (patch)
tree4b293ccc1ec34e1e4a47e5eecc2cc1e2663e5474 /android/source/src
parent31a689b83112bfa057c2f7f8306b875b9a2ac7c7 (diff)
tdf#124480 android: Use an actual button for "Select file to open"
Instead of using a TextView and setting `?attr/colorButtonNormal` for the background color, just use a button right away, which also makes sure that the proper button color is used and avoids using `colorButtonNormal` only available from API level 21 on. [1] Also drop the extra `LinearLayout` parent that was only containing this one TextView. While at it, drop an unused import. [1] https://developer.android.com/reference/android/R.attr#colorButtonNormal Change-Id: Ie2f7e2646d20f4051fb2513fb8fd72572ce19217 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160076 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'android/source/src')
-rw-r--r--android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
index eba618095045..6f583377d592 100644
--- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -43,7 +43,6 @@ import android.view.animation.AnimationUtils;
import android.view.animation.OvershootInterpolator;
import android.widget.LinearLayout;
import android.widget.TextView;
-import android.widget.Toast;
import org.libreoffice.AboutDialogFragment;
import org.libreoffice.BuildConfig;
@@ -199,7 +198,7 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
impressLayout = findViewById(R.id.impressLayout);
calcLayout = findViewById(R.id.calcLayout);
drawLayout = findViewById(R.id.drawLayout);
- TextView openFileView = findViewById(R.id.open_file_view);
+ TextView openFileView = findViewById(R.id.open_file_button);
openFileView.setOnClickListener(this);
@@ -458,7 +457,7 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
} else {
expandFabMenu();
}
- } else if (id == R.id.open_file_view) {
+ } else if (id == R.id.open_file_button) {
showSystemFilePickerAndOpenFile();
} else if (id == R.id.newWriterFAB) {
loadNewDocument(DocumentType.WRITER);