Added link to register a new user at owncloud.com ; fixed cancel button in account creation for SGS3

This commit is contained in:
David A. Velasco 2012-08-20 14:36:46 +02:00
parent 1f57ae3b1e
commit 081b333eb1
4 changed files with 29 additions and 5 deletions

View file

@ -17,8 +17,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
--> -->
<manifest package="com.owncloud.android" <manifest package="com.owncloud.android"
android:versionCode="103005" android:versionCode="103006"
android:versionName="1.3.5" xmlns:android="http://schemas.android.com/apk/res/android"> android:versionName="1.3.6" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" /> <uses-permission android:name="android.permission.USE_CREDENTIALS" />

View file

@ -140,16 +140,16 @@
</FrameLayout> </FrameLayout>
</LinearLayout> </LinearLayout>
</FrameLayout> </FrameLayout>
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
android:layout_alignParentBottom="true" >
<LinearLayout <LinearLayout
android:id="@+id/buttons_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:weightSum="1" > android:weightSum="1" >
@ -173,6 +173,21 @@
android:textColor="@android:color/black" /> android:textColor="@android:color/black" />
</LinearLayout> </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> </RelativeLayout>
</LinearLayout> </LinearLayout>

View file

@ -44,6 +44,7 @@
<string name="auth_host_url">ownCloud URL</string> <string name="auth_host_url">ownCloud URL</string>
<string name="auth_username">Username</string> <string name="auth_username">Username</string>
<string name="auth_password">Password</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_uri_error">Wrong URL given</string>
<string name="new_session_session_name_error">Wrong session name</string> <string name="new_session_session_name_error">Wrong session name</string>
<string name="sync_string_files">Files</string> <string name="sync_string_files">Files</string>

View file

@ -41,6 +41,7 @@ import android.content.ContentResolver;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
@ -228,6 +229,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
} }
} }
public void onCancelClick(View view) { public void onCancelClick(View view) {
setResult(RESULT_CANCELED);
finish(); finish();
} }
@ -246,6 +248,12 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
} }
continueConnection(prefix); continueConnection(prefix);
} }
public void onRegisterClick(View view) {
Intent register = new Intent(Intent.ACTION_VIEW, Uri.parse("https://owncloud.com/mobile/new"));
setResult(RESULT_CANCELED);
startActivity(register);
}
private void continueConnection(String prefix) { private void continueConnection(String prefix) {
String url = ((TextView) findViewById(R.id.host_URL)).getText() String url = ((TextView) findViewById(R.id.host_URL)).getText()