Merge pull request #115 from FineFindus/feat/uri-type

fix: apply URI InputType correctly
This commit is contained in:
LucasGGamerM 2023-03-10 15:55:50 -03:00 committed by GitHub
commit 2531015094
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -151,7 +151,7 @@ public class EditTimelinesFragment extends BaseRecyclerFragment<TimelineDefiniti
FrameLayout inputWrap = new FrameLayout(getContext()); FrameLayout inputWrap = new FrameLayout(getContext());
EditText input = new EditText(getContext()); EditText input = new EditText(getContext());
input.setHint(R.string.sk_example_domain); input.setHint(R.string.sk_example_domain);
input.setInputType(InputType.TYPE_TEXT_VARIATION_URI); input.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_URI);
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
params.setMargins(V.dp(16), V.dp(4), V.dp(16), V.dp(16)); params.setMargins(V.dp(16), V.dp(4), V.dp(16), V.dp(16));
input.setLayoutParams(params); input.setLayoutParams(params);

View File

@ -36,7 +36,7 @@
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:layout_marginHorizontal="16dp" android:layout_marginHorizontal="16dp"
android:inputType="textFilter|textNoSuggestions|textUri" android:inputType="textUri|textNoSuggestions"
android:singleLine="true" android:singleLine="true"
android:imeOptions="actionGo" android:imeOptions="actionGo"
android:drawableStart="@drawable/ic_fluent_globe_20_regular" android:drawableStart="@drawable/ic_fluent_globe_20_regular"