Added initial UI to ownCloud sample client for oc_framework
authorDavid A. Velasco <dvelasco@solidgear.es>
Fri, 10 Jan 2014 08:18:12 +0000 (09:18 +0100)
committerDavid A. Velasco <dvelasco@solidgear.es>
Fri, 10 Jan 2014 08:18:12 +0000 (09:18 +0100)
oc_framework/sample_client/AndroidManifest.xml
oc_framework/sample_client/res/layout/main.xml
oc_framework/sample_client/res/values-v11/styles.xml [new file with mode: 0644]
oc_framework/sample_client/res/values/dimensions.xml [new file with mode: 0644]
oc_framework/sample_client/res/values/strings.xml
oc_framework/sample_client/res/values/styles.xml [new file with mode: 0644]

index 0bb3be7..b929fd4 100644 (file)
@@ -7,8 +7,11 @@
         android:minSdkVersion="8"
         android:targetSdkVersion="19" />
     <application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
-        <activity android:name="MainActivity"
-                  android:label="@string/app_name">
+        <activity      android:name="MainActivity"
+                       android:label="@string/app_name"
+                                       android:screenOrientation="portrait"
+                                       android:configChanges="orientation|keyboardHidden"                  
+                  >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.LAUNCHER" />
index fe9b7ab..554dc65 100644 (file)
@@ -1,13 +1,69 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
     >
-<TextView
-    android:layout_width="fill_parent"
-    android:layout_height="wrap_content"
-    android:text="@string/hello_word"
-    />
-</LinearLayout>
+
+    <Button
+        android:id="@+id/button_refresh"
+        style="@style/ButtonStyle"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentTop="true"
+        android:text="@string/refresh" 
+        />
+
+    <ListView
+        android:id="@+id/list_view"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+               android:layout_below="@+id/button_refresh" 
+        android:layout_above="@+id/button_upload"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentRight="true"
+        >
+    </ListView>
+
+    <Button
+        android:id="@+id/button_upload"
+        style="@style/ButtonStyle"
+        android:layout_alignParentLeft="true"
+        android:layout_above="@+id/frame"
+        android:text="@string/upload"
+        />
+
+    <Button
+        android:id="@+id/button_delete_remote"
+        style="@style/ButtonStyle"
+        android:layout_alignParentRight="true"
+        android:layout_above="@id/frame"
+        android:text="@string/delete_remote_file" 
+        />
+
+    <FrameLayout
+        android:id="@id/frame"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/frame_height"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentRight="true"
+        android:layout_above="@+id/button_download"
+        >
+    </FrameLayout>
+
+    <Button
+        android:id="@id/button_download"
+        style="@style/ButtonStyle"
+        android:layout_alignParentBottom="true"
+        android:layout_alignParentLeft="true"
+        android:text="@string/download" 
+        />
+
+    <Button
+        android:id="@+id/button_delete_local"
+        style="@style/ButtonStyle"
+        android:layout_alignParentBottom="true"
+        android:layout_alignParentRight="true"
+        android:text="@string/delete_local_file" 
+        />
+
+</RelativeLayout>
 
diff --git a/oc_framework/sample_client/res/values-v11/styles.xml b/oc_framework/sample_client/res/values-v11/styles.xml
new file mode 100644 (file)
index 0000000..c928a35
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+    <style name="ButtonStyle" parent="@android:style/Widget.Holo.Button">
+        <item name="android:layout_width">160dp</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:textSize">14sp</item>
+    </style>
+</resources>
\ No newline at end of file
diff --git a/oc_framework/sample_client/res/values/dimensions.xml b/oc_framework/sample_client/res/values/dimensions.xml
new file mode 100644 (file)
index 0000000..224b59a
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <dimen name="frame_height">160dp</dimen>
+</resources>
\ No newline at end of file
index c6d9c69..d82df55 100644 (file)
@@ -1,5 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
     <string name="app_name">ownCloud Sample Client</string>
-    <string name="hello_word">Hello World. This is the ownCloud sample client app before doing nothing ownCloud-related.</string>
+    <string name="refresh">Refresh</string>
+    <string name="upload">Upload</string>
+    <string name="delete_remote_file">Delete remote file</string>
+    <string name="download">Download</string>
+    <string name="delete_local_file">Delete local file</string>
 </resources>
diff --git a/oc_framework/sample_client/res/values/styles.xml b/oc_framework/sample_client/res/values/styles.xml
new file mode 100644 (file)
index 0000000..9db99c2
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+    <style name="ButtonStyle" parent="@android:style/Widget.Button">
+        <item name="android:layout_width">160dp</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:textSize">14sp</item>
+    </style>
+</resources>
\ No newline at end of file