<string name="downloader_download_file_not_found">The file is no longer available on the server</string>
<string name="prefs_category_accounts">Accounts</string>
+ <string name="prefs_add_account">Add account</string>
</resources>
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<PreferenceCategory android:title="@string/prefs_category_accounts" android:key="accounts_category">
- <com.owncloud.android.ui.PreferenceMultiline android:title="@string/prefs_manage_accounts" android:key="add_account" />
+ <com.owncloud.android.ui.PreferenceMultiline android:title="@string/prefs_add_account" android:key="add_account" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/prefs_category_general">
android:title="@string/prefs_select_oc_account"
android:summary="@string/prefs_summary_select_oc_account"
/ -->
- <com.owncloud.android.ui.PreferenceMultiline android:title="@string/prefs_manage_accounts" android:key="manage_account" />
<com.owncloud.android.ui.CheckBoxPreferenceWithLongTitle android:title="@string/prefs_pincode" android:key="set_pincode"
android:summary="@string/prefs_pincode_summary"/>
<com.owncloud.android.ui.CheckBoxPreferenceWithLongTitle android:key="instant_uploading"
pAddAccount.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
-
- /*
- * Intent intent = new Intent(
- * android.provider.Settings.ACTION_ADD_ACCOUNT);
- * intent.putExtra("authorities", new String[] {
- * MainApp.getAuthTokenType() }); startActivity(intent);
- */
AccountManager am = AccountManager.get(getApplicationContext());
am.addAccount(MainApp.getAccountType(), null, null, null, Preferences.this, null, null);
return true;
}
});
- Preference pManageAccount = findPreference("manage_account");
- if (pManageAccount != null)
- pManageAccount.setOnPreferenceClickListener(new OnPreferenceClickListener() {
- @Override
- public boolean onPreferenceClick(Preference preference) {
- Intent i = new Intent(getApplicationContext(), AccountSelectActivity.class);
- startActivity(i);
- return true;
- }
- });
pCode = (CheckBoxPreference) findPreference("set_pincode");
if (pCode != null){
});
}
-
-
PreferenceCategory preferenceCategory = (PreferenceCategory) findPreference("more");