Added link to register a new user at owncloud.com ; fixed cancel button in account...
authorDavid A. Velasco <dvelasco@solidgear.es>
Mon, 20 Aug 2012 12:36:46 +0000 (14:36 +0200)
committerDavid A. Velasco <dvelasco@solidgear.es>
Mon, 20 Aug 2012 12:36:46 +0000 (14:36 +0200)
AndroidManifest.xml
res/layout/account_setup.xml
res/values/strings.xml
src/com/owncloud/android/ui/activity/AuthenticatorActivity.java

index eda2b13..bf7795c 100644 (file)
@@ -17,8 +17,8 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
  -->\r
 <manifest package="com.owncloud.android"\r
-    android:versionCode="103005"\r
-    android:versionName="1.3.5" xmlns:android="http://schemas.android.com/apk/res/android">\r
+    android:versionCode="103006"\r
+    android:versionName="1.3.6" xmlns:android="http://schemas.android.com/apk/res/android">\r
 \r
     <uses-permission android:name="android.permission.GET_ACCOUNTS" />\r
     <uses-permission android:name="android.permission.USE_CREDENTIALS" />\r
index 5f12872..b26942b 100644 (file)
 
             </FrameLayout>
 
-        </LinearLayout>
+            </LinearLayout>
 
     </FrameLayout>
 
     <RelativeLayout
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_alignParentBottom="true" >
+        android:layout_height="wrap_content">
 
         <LinearLayout
+            android:id="@+id/buttons_layout"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:weightSum="1" >
                 android:textColor="@android:color/black" />
 
         </LinearLayout>
+        
+               <Button
+                       android:id="@+id/account_register"
+                       android:layout_width="wrap_content"
+                       android:layout_height="wrap_content"
+                       android:layout_below="@id/buttons_layout"
+                       android:layout_centerHorizontal="true"
+                       android:onClick="onRegisterClick"
+                       android:paddingTop="10dp"
+                       android:paddingBottom="10dp"
+                       android:textColor="#0000FF"
+                       android:background="@android:color/transparent"
+                       android:text="@string/auth_register" />
+            
+        
     </RelativeLayout>
 
 </LinearLayout>
index 0b9b0b1..89e749f 100644 (file)
@@ -44,6 +44,7 @@
     <string name="auth_host_url">ownCloud URL</string>
     <string name="auth_username">Username</string>
     <string name="auth_password">Password</string>
+    <string name="auth_register">I am new at ownCloud</string>
     <string name="new_session_uri_error">Wrong URL given</string>
     <string name="new_session_session_name_error">Wrong session name</string>
     <string name="sync_string_files">Files</string>
index a71f65b..a109809 100644 (file)
@@ -41,6 +41,7 @@ import android.content.ContentResolver;
 import android.content.DialogInterface;\r
 import android.content.Intent;\r
 import android.content.SharedPreferences;\r
+import android.net.Uri;\r
 import android.os.Bundle;\r
 import android.os.Handler;\r
 import android.preference.PreferenceManager;\r
@@ -228,6 +229,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
         }\r
     }\r
     public void onCancelClick(View view) {\r
+        setResult(RESULT_CANCELED);\r
         finish();\r
     }\r
     \r
@@ -246,6 +248,12 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
         }\r
         continueConnection(prefix);\r
     }\r
+    \r
+    public void onRegisterClick(View view) {\r
+        Intent register = new Intent(Intent.ACTION_VIEW, Uri.parse("https://owncloud.com/mobile/new"));\r
+        setResult(RESULT_CANCELED);\r
+        startActivity(register);\r
+    }\r
 \r
     private void continueConnection(String prefix) {\r
         String url = ((TextView) findViewById(R.id.host_URL)).getText()\r