aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2021-01-18 14:35:57 +0000
committerAlex Ning <chineseperson5@gmail.com>2021-01-18 14:35:57 +0000
commitf13d4576e1330f69c868cd0b3d4cf605801edf94 (patch)
tree61585d1901aefd41bf1e009c3e3cf075a4dc8571 /app
parentd2749d15d5009dfca3bbbdcf40c3512f1ee792e4 (diff)
downloadinfinity-for-reddit-f13d4576e1330f69c868cd0b3d4cf605801edf94.tar
infinity-for-reddit-f13d4576e1330f69c868cd0b3d4cf605801edf94.tar.gz
infinity-for-reddit-f13d4576e1330f69c868cd0b3d4cf605801edf94.tar.bz2
infinity-for-reddit-f13d4576e1330f69c868cd0b3d4cf605801edf94.tar.lz
infinity-for-reddit-f13d4576e1330f69c868cd0b3d4cf605801edf94.tar.xz
infinity-for-reddit-f13d4576e1330f69c868cd0b3d4cf605801edf94.tar.zst
infinity-for-reddit-f13d4576e1330f69c868cd0b3d4cf605801edf94.zip
Minor UI tweaks for dialog_insert_link.
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/MarkdownBottomBarRecyclerViewAdapter.java7
-rw-r--r--app/src/main/res/layout/dialog_insert_link.xml58
2 files changed, 44 insertions, 21 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/MarkdownBottomBarRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/MarkdownBottomBarRecyclerViewAdapter.java
index 8145e8a0..b7057106 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/MarkdownBottomBarRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/MarkdownBottomBarRecyclerViewAdapter.java
@@ -12,9 +12,10 @@ import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.google.android.material.slider.Slider;
+import com.google.android.material.textfield.TextInputEditText;
-import ml.docilealligator.infinityforreddit.customtheme.CustomThemeWrapper;
import ml.docilealligator.infinityforreddit.R;
+import ml.docilealligator.infinityforreddit.customtheme.CustomThemeWrapper;
public class MarkdownBottomBarRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
@@ -125,8 +126,8 @@ public class MarkdownBottomBarRecyclerViewAdapter extends RecyclerView.Adapter<R
}
case MarkdownBottomBarRecyclerViewAdapter.LINK: {
View dialogView = activity.getLayoutInflater().inflate(R.layout.dialog_insert_link, null);
- EditText textEditText = dialogView.findViewById(R.id.edit_text_insert_link_dialog);
- EditText linkEditText = dialogView.findViewById(R.id.edit_link_insert_link_dialog);
+ TextInputEditText textEditText = dialogView.findViewById(R.id.edit_text_insert_link_dialog);
+ TextInputEditText linkEditText = dialogView.findViewById(R.id.edit_link_insert_link_dialog);
int start = Math.max(commentEditText.getSelectionStart(), 0);
int end = Math.max(commentEditText.getSelectionEnd(), 0);
diff --git a/app/src/main/res/layout/dialog_insert_link.xml b/app/src/main/res/layout/dialog_insert_link.xml
index c54e66ff..fcaad293 100644
--- a/app/src/main/res/layout/dialog_insert_link.xml
+++ b/app/src/main/res/layout/dialog_insert_link.xml
@@ -1,30 +1,52 @@
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
- <EditText
- android:id="@+id/edit_text_insert_link_dialog"
+ <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:padding="24dp"
- android:background="#00000000"
- android:hint="@string/text_hint"
- android:textColor="?attr/primaryTextColor"
- android:textSize="?attr/font_default"
- android:fontFamily="?attr/font_family" />
+ android:paddingStart="16dp"
+ android:paddingTop="8dp"
+ android:paddingEnd="16dp"
+ android:paddingBottom="8dp"
+ app:boxStrokeColor="?attr/primaryTextColor"
+ app:hintTextColor="?attr/primaryTextColor"
+ style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
- <EditText
- android:id="@+id/edit_link_insert_link_dialog"
+ <com.google.android.material.textfield.TextInputEditText
+ android:id="@+id/edit_text_insert_link_dialog"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/text_hint"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_default"
+ android:fontFamily="?attr/font_family" />
+
+ </com.google.android.material.textfield.TextInputLayout>
+
+ <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:padding="24dp"
- android:background="#00000000"
- android:hint="@string/link_hint"
- android:textColor="?attr/primaryTextColor"
- android:textSize="?attr/font_default"
- android:fontFamily="?attr/font_family" />
+ android:paddingStart="16dp"
+ android:paddingTop="8dp"
+ android:paddingEnd="16dp"
+ android:paddingBottom="8dp"
+ app:boxStrokeColor="?attr/primaryTextColor"
+ app:hintTextColor="?attr/primaryTextColor"
+ style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
+
+ <com.google.android.material.textfield.TextInputEditText
+ android:id="@+id/edit_link_insert_link_dialog"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/link_hint"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_default"
+ android:fontFamily="?attr/font_family" />
+
+ </com.google.android.material.textfield.TextInputLayout>
</LinearLayout> \ No newline at end of file