Skip to content

Commit

Permalink
Make Scan button floating
Browse files Browse the repository at this point in the history
in centre bottom of the screen
  • Loading branch information
ViliusKraujutis committed Mar 29, 2014
1 parent 0f545f4 commit 0252eaf
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 16 deletions.
Binary file added app/src/main/res/drawable-hdpi/scan_icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-mdpi/scan_icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xhdpi/scan_icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-xxhdpi/scan_icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 12 additions & 15 deletions app/src/main/res/layout/fragment_main.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
<LinearLayout
android:orientation="vertical"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_send"
android:id="@+id/buttonScan" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/list_header_items"
android:paddingTop="12dp" />

<ListView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/main_items_list"
tools:listitem="@layout/row_scanned_item" />
</LinearLayout>

<ImageButton
android:id="@+id/buttonScan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_send"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:src="@drawable/scan_icon"
android:layout_marginBottom="@dimen/padding_larger" />
</RelativeLayout>
1 change: 0 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<string name="app_name">Maisto Bankas</string>
<string name="hello_world">Hello world!</string>
<string name="action_settings">Settings</string>
<string name="list_header_items">Prekės</string>
<string name="button_settings">Nustatymai</string>
<string name="button_send">Skenuoti</string>
<string name="barcode_scan_message">Prašome nuskenuoti prekės barkodą</string>
Expand Down
Binary file added app/src/main/scan_icon-web.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0252eaf

Please sign in to comment.