mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 21:25:35 +03:00
Make resource values for some hardcoded string
This commit is contained in:
parent
275eb1f8f8
commit
7c93676d6f
7 changed files with 13 additions and 51 deletions
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item android:id="@+id/createAccount" android:title="Create Account" android:showAsAction="ifRoom|withText"></item>
|
||||
<item android:id="@+id/createAccount" android:title="@string/create_account" android:showAsAction="ifRoom|withText"></item>
|
||||
|
||||
|
||||
</menu>
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item android:id="@+id/delete_account" android:title="Delete account"></item>
|
||||
<item android:id="@+id/delete_account" android:title="@string/delete_account"></item>
|
||||
|
||||
|
||||
</menu>
|
|
@ -7,5 +7,5 @@
|
|||
<!-- <item android:id="@+id/search" android:title="@string/actionbar_search" android:icon="@drawable/ic_action_search"></item>-->
|
||||
<item android:id="@+id/action_upload" android:title="@string/actionbar_upload" android:icon="@drawable/ic_action_upload"></item>
|
||||
<item android:id="@+id/action_settings" android:title="@string/actionbar_settings" android:icon="@android:drawable/ic_menu_preferences"></item>
|
||||
<item android:id="@+id/about_app" android:title="About" android:icon="@android:drawable/ic_menu_info_details"></item>
|
||||
<item android:id="@+id/about_app" android:title="@string/about_title" android:icon="@android:drawable/ic_menu_info_details"></item>
|
||||
</menu>
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
<string name="prefs_trackmydevice_interval">Update interval</string>
|
||||
<string name="prefs_trackmydevice_interval_summary">Update every %1$s minutes</string>
|
||||
<string name="prefs_accounts">Accounts</string>
|
||||
<string name="prefs_manage_accounts">Manage accounts</string>
|
||||
|
||||
<string name="auth_host_url">ownCloud URL</string>
|
||||
<string name="auth_username">Username</string>
|
||||
|
@ -69,6 +70,12 @@
|
|||
<string name="common_cancel">Cancel</string>
|
||||
<string name="common_save_exit">Save & Exit</string>
|
||||
<string name="common_error">Error</string>
|
||||
<string name="about_title">About</string>
|
||||
|
||||
<string name="delete_account">Delete account</string>
|
||||
<string name="create_account">Create account</string>
|
||||
|
||||
<string name="upload_chooser_title">Upload file from …</string>
|
||||
<string name="uploader_info_dirname">Directory name</string>
|
||||
<string name="uploader_upload_in_progress_ticker">Uploading …</string>
|
||||
<string name="uploader_upload_in_progress_content">%1$d%% Uploading %2$s</string>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
android:title="@string/prefs_select_oc_account"
|
||||
android:summary="@string/prefs_summary_select_oc_account"
|
||||
/ -->
|
||||
<Preference android:title="Manage accounts" android:key="manage_account" />
|
||||
<Preference android:title="@string/prefs_manage_accounts" android:key="manage_account" />
|
||||
<CheckBoxPreference android:title="ownCloud App PIN" android:key="set_pincode"
|
||||
android:summary="Protect your ownCloud client"/>
|
||||
<CheckBoxPreference android:key="instant_uploading"
|
||||
|
|
|
@ -185,7 +185,7 @@ public class FileDisplayActivity extends SherlockFragmentActivity implements
|
|||
action = action.setType("*/*")
|
||||
.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
startActivityForResult(
|
||||
Intent.createChooser(action, "Upload file from..."),
|
||||
Intent.createChooser(action, getString(R.string.upload_chooser_title)),
|
||||
ACTION_SELECT_FILE);
|
||||
break;
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ public class FileDisplayActivity extends SherlockFragmentActivity implements
|
|||
break;
|
||||
case DIALOG_ABOUT_APP: {
|
||||
builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle("About");
|
||||
builder.setTitle(getString(R.string.about_title));
|
||||
PackageInfo pkg;
|
||||
try {
|
||||
pkg = getPackageManager().getPackageInfo(getPackageName(), 0);
|
||||
|
|
|
@ -406,51 +406,6 @@ public class FileDetailFragment extends SherlockFragment implements
|
|||
|
||||
setButtonsForDown();
|
||||
|
||||
// Change download button to open button
|
||||
/*downloadButton.setText(R.string.filedetails_open);
|
||||
downloadButton.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String storagePath = mFile.getStoragePath();
|
||||
String encodedStoragePath = WebdavUtils.encodePath(storagePath);
|
||||
try {
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
i.setDataAndType(Uri.parse("file://"+ encodedStoragePath), mFile.getMimetype());
|
||||
i.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
|
||||
startActivity(i);
|
||||
|
||||
} catch (Throwable t) {
|
||||
Log.e(TAG, "Fail when trying to open with the mimeType provided from the ownCloud server: " + mFile.getMimetype());
|
||||
boolean toastIt = true;
|
||||
String mimeType = "";
|
||||
try {
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
mimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(storagePath.substring(storagePath.lastIndexOf('.') + 1));
|
||||
if (mimeType != null && !mimeType.equals(mFile.getMimetype())) {
|
||||
i.setDataAndType(Uri.parse("file://"+ encodedStoragePath), mimeType);
|
||||
i.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
|
||||
startActivity(i);
|
||||
toastIt = false;
|
||||
}
|
||||
|
||||
} catch (IndexOutOfBoundsException e) {
|
||||
Log.e(TAG, "Trying to find out MIME type of a file without extension: " + storagePath);
|
||||
|
||||
} catch (ActivityNotFoundException e) {
|
||||
Log.e(TAG, "No activity found to handle: " + storagePath + " with MIME type " + mimeType + " obtained from extension");
|
||||
|
||||
} catch (Throwable th) {
|
||||
Log.e(TAG, "Unexpected problem when opening: " + storagePath, th);
|
||||
|
||||
} finally {
|
||||
if (toastIt) {
|
||||
Toast.makeText(getActivity(), "There is no application to handle file " + mFile.getFileName(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});*/
|
||||
} else {
|
||||
setButtonsForRemote();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue