Ray Zhang 12 år sedan
förälder
incheckning
ff997463d8

+ 44 - 0
Apex/res/layout/activity_customize_fields.xml

@@ -0,0 +1,44 @@
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+
+    tools:context=".CustomizeFieldsActivity" >
+
+    <com.usai.apex.DragListView   
+       android:id="@+id/drag_list"   
+       android:layout_width="fill_parent"   
+       android:layout_height="fill_parent"  
+       android:layout_above="@+id/foot"
+       android:cacheColorHint="#00000000"/>  
+<LinearLayout
+        android:id="@+id/foot"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true"
+        android:layout_alignParentLeft="true"
+        android:orientation="vertical" >
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal" >
+
+            <Button
+                android:id="@+id/btncancel"
+                style="?android:attr/buttonStyleSmall"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:text="@android:string/cancel" />
+
+            <Button
+                android:id="@+id/btnok"
+                style="?android:attr/buttonStyleSmall"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:text="@android:string/ok" />
+        </LinearLayout>
+    </LinearLayout>
+</RelativeLayout>

+ 25 - 0
Apex/res/layout/drag_list_item.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 一定要使用相对布局 -->
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content" >
+
+    <TextView
+        android:id="@+id/drag_list_item_text"
+        android:layout_width="wrap_content"
+        android:layout_height="32dp"
+        android:layout_alignParentLeft="true"
+        android:layout_centerVertical="true"
+       
+        android:gravity="center_vertical"
+        android:paddingLeft="5dip" />
+
+    <ImageView
+        android:id="@+id/drag_list_item_image"
+        android:layout_width="wrap_content"
+        android:layout_height="32dp"
+        android:layout_alignParentRight="true"
+        android:layout_centerVertical="true"
+        android:src="@drawable/ic_launcher" />
+
+</RelativeLayout>

+ 14 - 0
Apex/res/layout/drag_list_item_tag.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>  
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"  
+    android:layout_width="fill_parent"  
+    android:layout_height="wrap_content"  
+    android:background="#555555"  
+    android:padding="5dip"  
+    android:paddingLeft="10dip">  
+    <TextView  
+       android:id="@+id/drag_list_item_text"  
+       android:layout_width="wrap_content"  
+       android:layout_height="20dip"  
+       android:textColor="#ffffff"  
+       android:gravity="center_vertical"/>  
+</LinearLayout>  

+ 9 - 0
Apex/res/menu/customize_fields.xml

@@ -0,0 +1,9 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+
+    <item
+        android:id="@+id/action_settings"
+        android:orderInCategory="100"
+        android:showAsAction="never"
+        android:title="@string/action_settings"/>
+
+</menu>

+ 2 - 1
Apex/res/values/strings.xml

@@ -3,7 +3,7 @@
 
     <string name="app_name">Apex</string>
     <string name="action_settings">Settings</string>
-    <string name="action_custom_fields">Custom Fields</string>
+    <string name="action_custom_fields">Customize Fields</string>
     <string name="hello_world">Hello world!</string>
     <string name="msg_net_resulterror">An error occur on server</string>
     <string name="msg_net_error">Can not connect to server</string>
@@ -13,5 +13,6 @@
     <string name="title_activity_function_select">FunctionSelectActivity</string>
     <string name="title_activity_test">TestActivity</string>
     <string name="title_activity_search">SearchActivity</string>
+    <string name="title_activity_customize_fields">CustomizeFieldsActivity</string>
 
 </resources>