Browse Source

Merge branch 'master' of https://git.tk.informatik.tu-darmstadt.de/scm-ssi-student-hostagev2

Julien Clauter 10 years ago
parent
commit
313da06798

+ 6 - 0
res/drawable/services_circle.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<shape android:shape="oval" xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="@color/dark_grey" />
+
+</shape>

+ 2 - 0
res/layout/fragment_services.xml

@@ -109,6 +109,8 @@
     <ListView android:layout_width="fill_parent"
               android:layout_height="wrap_content"
               android:id="@+id/services_list_view"
+              android:layout_marginLeft="15dp"
+              android:layout_marginRight="15dp"
             >
 
 

+ 21 - 13
res/layout/services_list_item.xml

@@ -9,7 +9,11 @@
                     android:layout_height="wrap_content"
                     android:baselineAligned="false"
                     android:orientation="horizontal"
-                    android:weightSum="1" >
+                    android:weightSum="1">
+        <View android:layout_width="25dp" android:layout_height="25dp"
+              android:layout_marginLeft="12dp"
+              android:layout_marginTop="10dp"
+              android:background="@drawable/services_circle" />
         <TextView
                 android:id="@+id/services_item_name"
                 android:layout_width="wrap_content"
@@ -24,7 +28,7 @@
                 android:textStyle="bold"
                 android:textSize="16dp"/>
         <TextView
-                android:id="@+id/services_item_rec_attacks"
+                android:id="@+id/services_item_text"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_alignParentEnd="true"
@@ -33,7 +37,20 @@
                 android:layout_marginLeft="50dp"
                 android:layout_marginTop="25dp"
                 android:layout_weight="1"
-                android:text="recorded attacks: 20"
+                android:text="recorded attacks: "
+                android:textStyle="bold"
+                android:textSize="12dp"/>
+        <TextView
+                android:id="@+id/services_item_rec_attacks"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:layout_alignParentLeft="true"
+                android:layout_alignParentRight="false"
+                android:layout_marginLeft="150dp"
+                android:layout_marginTop="25dp"
+                android:layout_weight="1"
+                android:text="20"
                 android:textStyle="bold"
                 android:textSize="12dp"/>
         <Switch
@@ -47,20 +64,11 @@
                 android:layout_alignParentTop="false"
                 android:layout_gravity="right"
                 android:layout_marginLeft="0dp"
-                android:layout_marginRight="15dp"
-                android:layout_marginTop="10dp"
+                android:layout_marginTop="8dp"
                 android:layout_marginBottom="0dp"
                 android:layout_weight="1"
                 android:checked="false"
                 android:textSize="10dp" />
     </RelativeLayout>
 
-    <View
-            android:layout_width="fill_parent"
-            android:layout_height="1dp"
-            android:layout_marginLeft="15dp"
-            android:layout_marginRight="15dp"
-            android:background="@android:color/darker_gray" />
-
-
 </LinearLayout>

+ 0 - 1
src/de/tudarmstadt/informatik/hostage/ui2/adapter/ServicesListAdapter.java

@@ -61,7 +61,6 @@ public class ServicesListAdapter extends ArrayAdapter<ServicesListItem> {
 		}
 
 		holder.protocolName.setText(item.protocol);
-		holder.recordedAttacks.setText(item.attacks);
 
 
 		return rowView;