]> rtime.felk.cvut.cz Git - hornmich/skoda-qr-demo.git/commitdiff
Tune the preview activity layout
authorMichal Horn <hornmich@fel.cvut.cz>
Tue, 10 Feb 2015 17:09:29 +0000 (18:09 +0100)
committerMichal Horn <hornmich@fel.cvut.cz>
Tue, 10 Feb 2015 17:09:29 +0000 (18:09 +0100)
QRScanner/mobile/src/main/res/layout-land/activity_preview.xml
QRScanner/mobile/src/main/res/layout/activity_preview.xml

index 045bfbab958e7cb21bd730333bef92caf7ac2531..190e8b6094ccee779db00323629fc8a8f2708561 100644 (file)
             android:text="Select document to view"
             android:id="@+id/textView2"/>
 
-        <Button
+        <RelativeLayout
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:text="Kontakty"
-            android:id="@+id/butContacts"
-            android:onClick="showContacts"
-            android:layout_gravity="center_horizontal"/>
+            android:layout_height="match_parent"
+            android:layout_gravity="center_horizontal">
 
-        <Button
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:text="Vyrobni postup"
-            android:id="@+id/butManufacturing"
-            android:onClick="showManufacturing"
-            android:layout_gravity="center_horizontal"/>
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceSmall"
+                android:id="@+id/textView3"
+                android:layout_centerVertical="true"
+                android:layout_centerHorizontal="true"/>
 
-        <Button
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:text="Obrazovy vyrobni postup"
-            android:id="@+id/butManufactImages"
-            android:onClick="showManufactImages"
-            android:layout_gravity="center_horizontal"/>
+            <RelativeLayout
+                android:layout_width="fill_parent"
+                android:layout_height="fill_parent"
+                android:layout_above="@+id/textView3"
+                android:layout_centerHorizontal="true">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textAppearance="?android:attr/textAppearanceSmall"
+                    android:id="@+id/textView4"
+                    android:layout_centerVertical="true"
+                    android:layout_centerHorizontal="true"/>
+
+                <Button
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:text="Obrazovy vyrobni postup"
+                    android:id="@+id/butManufactImages"
+                    android:onClick="showManufactImages"
+                    android:layout_gravity="center_horizontal"
+                    android:layout_column="0"
+                    android:layout_below="@+id/textView4"
+                    android:layout_alignParentLeft="true"
+                    android:layout_alignParentStart="true"
+                    android:layout_alignParentBottom="true"/>
+
+                <Button
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:text="Dilenska prirucka"
+                    android:id="@+id/butManufactGuide"
+                    android:onClick="showManufactGuide"
+                    android:layout_gravity="center_horizontal"
+                    android:layout_column="0"
+                    android:layout_above="@+id/textView4"
+                    android:layout_alignParentLeft="true"
+                    android:layout_alignParentStart="true"
+                    android:layout_alignParentTop="true"/>
+            </RelativeLayout>
+
+            <RelativeLayout
+                android:layout_width="fill_parent"
+                android:layout_height="fill_parent"
+                android:layout_below="@+id/textView3"
+                android:layout_centerHorizontal="true">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textAppearance="?android:attr/textAppearanceSmall"
+                    android:id="@+id/textView5"
+                    android:layout_centerVertical="true"
+                    android:layout_centerHorizontal="true"/>
+
+                <Button
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:text="Kontakty"
+                    android:id="@+id/butContacts"
+                    android:onClick="showContacts"
+                    android:layout_column="0"
+                    android:layout_below="@+id/textView5"
+                    android:layout_alignParentLeft="true"
+                    android:layout_alignParentStart="true"
+                    android:layout_alignParentBottom="true"/>
+
+                <Button
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:text="Vyrobni postup"
+                    android:id="@+id/butManufacturing"
+                    android:onClick="showManufacturing"
+                    android:layout_gravity="center_horizontal"
+                    android:layout_column="0"
+                    android:layout_above="@+id/textView5"
+                    android:layout_alignParentLeft="true"
+                    android:layout_alignParentStart="true"
+                    android:layout_alignParentTop="true"/>
+            </RelativeLayout>
+        </RelativeLayout>
 
-        <Button
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:text="Dilenska prirucka"
-            android:id="@+id/butManufactGuide"
-            android:onClick="showManufactGuide"
-            android:layout_gravity="center_horizontal"/>
     </LinearLayout>
 
     <ImageView
         android:layout_height="match_parent"
         android:id="@+id/imgComponent"
         android:layout_weight="0.95"
-        android:layout_gravity="center_horizontal"/>
+        android:layout_gravity="center_horizontal"
+        android:scaleType="center"/>
 
 </LinearLayout>
\ No newline at end of file
index 36845ed316769cb76a888e7c15313c2b266a82ed..2330e791113748d3873cbf8f9c326958addb5ff9 100644 (file)
@@ -54,6 +54,7 @@
         android:layout_height="match_parent"
         android:id="@+id/imgComponent"
         android:layout_weight="0.95"
-        android:layout_gravity="center_vertical"/>
+        android:layout_gravity="center_vertical"
+        android:scaleType="center"/>
 
 </LinearLayout>