]> Pileus Git - ~andy/freeotp/blobdiff - res/layout/token.xml
Resurrect refresh icon / circle progress bar
[~andy/freeotp] / res / layout / token.xml
index 9f5cd3d9ac537ee9d34a821a16cf1af3d507b654..d6ad3efb847b9c8e503471ee8edfbd5b180e8f81 100644 (file)
    - limitations under the License.
    -->
 
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:layout_marginTop="4dp"
     android:layout_marginBottom="4dp"
     android:layout_marginLeft="8dp"
     android:layout_marginRight="8dp"
-    android:background="@drawable/token"
-    android:orientation="vertical" >
-    <TextView
-        android:id="@+id/code"
-        android:layout_width="match_parent"
-        android:layout_height="60dp"
-        android:gravity="center"
-        android:paddingTop="4dp"
-        android:text="01234567"
-        android:textSize="48sp"
-        android:textStyle="bold"
-        android:typeface="monospace" />
-
-    <org.fedorahosted.freeotp.UrgencyProgressBar
-        android:id="@+id/progress"
-        style="?android:attr/progressBarStyleHorizontal"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:max="1000"
-        android:progress="500" />
+    android:background="@drawable/token" >
 
     <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_margin="4dp"
-        android:orientation="horizontal" >
+        android:layout_height="96dp"
+        android:orientation="vertical" >
+
+        <TextView
+            android:id="@+id/code"
+            android:layout_width="match_parent"
+            android:layout_height="48dp"
+            android:gravity="center|left"
+            android:text="01234567"
+            android:textSize="38sp"
+            android:textStyle="bold"
+            android:typeface="monospace" />
 
         <LinearLayout
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
+            android:layout_width="match_parent"
+            android:layout_height="48dp"
+            android:paddingTop="4dp"
+            android:paddingBottom="4dp"
             android:orientation="vertical" >
-
             <TextView
                 android:id="@+id/issuer"
                 android:layout_width="match_parent"
-                android:layout_height="24dp"
+                android:layout_height="0dp"
+                android:layout_weight="3"
+                android:layout_marginRight="48dp"
                 android:ellipsize="end"
-                android:gravity="center_vertical"
+                android:gravity="left|center"
                 android:singleLine="true"
                 android:text="example@example.com"
                 android:textColor="@android:color/primary_text_light"
             <TextView
                 android:id="@+id/label"
                 android:layout_width="match_parent"
-                android:layout_height="16dp"
+                android:layout_height="0dp"
+                android:layout_weight="2"
+                android:layout_marginRight="48dp"
                 android:ellipsize="end"
-                android:gravity="center_vertical"
+                android:gravity="left|center"
                 android:singleLine="true"
                 android:text="1FMAS0M43MF98ASMDMF10MF0M"
                 android:textColor="@android:color/secondary_text_light"
                 android:textSize="12sp"
                 android:textStyle="normal" />
         </LinearLayout>
-
-        <CheckBox
-            android:id="@+id/checkBox"
-            android:layout_width="40dp"
-            android:layout_height="40dp"
-            android:background="?android:attr/selectableItemBackground" />
     </LinearLayout>
-</LinearLayout>
+
+    <ImageView
+        android:id="@+id/image"
+        android:layout_width="48dp"
+        android:layout_height="48dp"
+        android:layout_gravity="top|right"
+        android:padding="4dp"
+        android:src="@drawable/generate" />
+
+    <org.fedorahosted.freeotp.CircleProgressBar
+        android:id="@+id/progress"
+        style="?android:attr/progressBarStyleHorizontal"
+        android:layout_width="48dp"
+        android:layout_height="48dp"
+        android:layout_gravity="top|right"
+        android:max="1000"
+        android:padding="8dp"
+        android:progress="750" />
+
+    <CheckBox
+        android:id="@+id/checkBox"
+        android:layout_width="40dp"
+        android:layout_height="48dp"
+        android:layout_gravity="bottom|right"
+        android:background="?android:attr/selectableItemBackground"
+        android:gravity="center_vertical" />
+</FrameLayout>