-
-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- If the view is too small, it's not possible to scroll (useful when the keyboard is visible) - The keyboard now shows the "search" icon - Validating with the keyboard (search icon or Enter button) will trigger the search - A request focus is asked, but not fully working as the MainActivity calls hideKeyboard after the Fragment lifecycle
- Loading branch information
Showing
2 changed files
with
78 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,63 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
<FrameLayout 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:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:gravity="center" | ||
android:orientation="vertical" | ||
android:padding="@dimen/activity_horizontal_margin"> | ||
android:layout_gravity="center"> | ||
|
||
<ImageView | ||
android:id="@+id/imageSearch" | ||
android:layout_width="250dp" | ||
<ScrollView | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginBottom="14dp" | ||
android:adjustViewBounds="true" | ||
android:contentDescription="@string/search_button" | ||
app:srcCompat="@drawable/ic_crowdsourcing_icon" /> | ||
android:layout_gravity="center" | ||
tools:ignore="UselessParent"> | ||
|
||
<EditText | ||
android:id="@+id/editTextBarcode" | ||
android:layout_width="match_parent" | ||
android:layout_height="50dp" | ||
android:layout_marginTop="10dp" | ||
android:layout_marginBottom="14dp" | ||
android:background="@drawable/edittext_full" | ||
android:drawablePadding="10dip" | ||
android:ems="10" | ||
android:hint="@string/hintBarcode" | ||
android:inputType="number" | ||
android:maxLines="1" | ||
android:paddingLeft="10dip" | ||
android:paddingRight="10dip" /> | ||
|
||
<Button | ||
android:id="@+id/buttonBarcode" | ||
style="@style/ButtonRounded" | ||
android:layout_width="match_parent" | ||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center_horizontal" | ||
android:orientation="vertical" | ||
android:padding="@dimen/activity_horizontal_margin"> | ||
|
||
android:layout_height="wrap_content" | ||
android:layout_marginTop="4dp" | ||
android:gravity="center" | ||
android:text="@string/action_find" | ||
android:textSize="@dimen/font_large" /> | ||
</LinearLayout> | ||
<ImageView | ||
android:id="@+id/imageSearch" | ||
android:layout_width="250dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginBottom="14dp" | ||
android:adjustViewBounds="true" | ||
android:contentDescription="@string/search_button" | ||
app:srcCompat="@drawable/ic_crowdsourcing_icon" /> | ||
|
||
<EditText | ||
android:id="@+id/editTextBarcode" | ||
android:layout_width="match_parent" | ||
android:layout_height="50dp" | ||
android:layout_marginTop="10dp" | ||
android:layout_marginBottom="14dp" | ||
android:background="@drawable/edittext_full" | ||
android:drawablePadding="10dp" | ||
android:ems="10" | ||
android:gravity="center" | ||
android:hint="@string/hintBarcode" | ||
android:imeOptions="actionSearch" | ||
android:inputType="number" | ||
android:maxLines="1" | ||
android:paddingLeft="10dp" | ||
android:paddingRight="10dp"> | ||
|
||
</EditText> | ||
|
||
<Button | ||
android:id="@+id/buttonBarcode" | ||
style="@style/ButtonRounded" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="4dp" | ||
android:gravity="center" | ||
android:text="@string/action_find" | ||
android:textSize="@dimen/font_large" /> | ||
</LinearLayout> | ||
|
||
</ScrollView> | ||
|
||
</FrameLayout> |