couple more resourec edits here and there
This commit is contained in:
parent
727acce7ff
commit
413eed3329
|
@ -41,7 +41,7 @@ public class AboutActivity extends SimpleActivity {
|
|||
|
||||
private void setupEmail() {
|
||||
final String email = mRes.getString(R.string.email);
|
||||
final String appName = mRes.getString(R.string.smtfp_app_name);
|
||||
final String appName = mRes.getString(R.string.app_name);
|
||||
final String href = "<a href=\"mailto:" + email + "?subject=" + appName + "\">" + email + "</a>";
|
||||
mEmailTV.setText(Html.fromHtml(href));
|
||||
mEmailTV.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
|
@ -63,9 +63,9 @@ public class AboutActivity extends SimpleActivity {
|
|||
@OnClick(R.id.about_invite)
|
||||
public void inviteFriend() {
|
||||
final Intent intent = new Intent();
|
||||
final String text = String.format(getString(R.string.share_text), getString(R.string.smtfp_app_name), getStoreUrl());
|
||||
final String text = String.format(getString(R.string.share_text), getString(R.string.app_name), getStoreUrl());
|
||||
intent.setAction(Intent.ACTION_SEND);
|
||||
intent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.smtfp_app_name));
|
||||
intent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.app_name));
|
||||
intent.putExtra(Intent.EXTRA_TEXT, text);
|
||||
intent.setType("text/plain");
|
||||
startActivity(Intent.createChooser(intent, getString(R.string.invite_via)));
|
||||
|
|
|
@ -38,7 +38,7 @@ import com.simplemobiletools.filemanager.Utils;
|
|||
import com.simplemobiletools.filemanager.adapters.ItemsAdapter;
|
||||
import com.simplemobiletools.filemanager.asynctasks.CopyTask;
|
||||
import com.simplemobiletools.filemanager.dialogs.PropertiesDialog;
|
||||
import com.simplemobiletools.filemanager.dialogs.SelectFolderDialog;
|
||||
import com.simplemobiletools.filepicker.dialogs.SelectFolderDialog;
|
||||
import com.simplemobiletools.filepicker.models.FileDirItem;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -215,8 +215,8 @@ public class ItemsFragment extends android.support.v4.app.Fragment
|
|||
final AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
|
||||
builder.setTitle(getResources().getString(R.string.create_new));
|
||||
builder.setView(newItemView);
|
||||
builder.setPositiveButton(R.string.smtfp_ok, null);
|
||||
builder.setNegativeButton(R.string.smtfp_cancel, null);
|
||||
builder.setPositiveButton(R.string.ok, null);
|
||||
builder.setNegativeButton(R.string.cancel, null);
|
||||
|
||||
final AlertDialog alertDialog = builder.create();
|
||||
alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||
|
@ -394,8 +394,8 @@ public class ItemsFragment extends android.support.v4.app.Fragment
|
|||
final AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
|
||||
builder.setTitle(getResources().getString(title));
|
||||
builder.setView(renameView);
|
||||
builder.setPositiveButton(R.string.smtfp_ok, null);
|
||||
builder.setNegativeButton(R.string.smtfp_cancel, null);
|
||||
builder.setPositiveButton(R.string.ok, null);
|
||||
builder.setNegativeButton(R.string.cancel, null);
|
||||
|
||||
final AlertDialog alertDialog = builder.create();
|
||||
alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||
|
@ -445,8 +445,8 @@ public class ItemsFragment extends android.support.v4.app.Fragment
|
|||
final AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
|
||||
builder.setTitle(getResources().getString(copyString));
|
||||
builder.setView(copyView);
|
||||
builder.setPositiveButton(R.string.smtfp_ok, null);
|
||||
builder.setNegativeButton(R.string.smtfp_cancel, null);
|
||||
builder.setPositiveButton(R.string.ok, null);
|
||||
builder.setNegativeButton(R.string.cancel, null);
|
||||
|
||||
mCopyDialog = builder.create();
|
||||
mCopyDialog.show();
|
||||
|
@ -454,7 +454,7 @@ public class ItemsFragment extends android.support.v4.app.Fragment
|
|||
@Override
|
||||
public void onClick(View v) {
|
||||
final String destinationPath = mDestinationView.getText().toString().trim();
|
||||
if (destinationPath.equals(getResources().getString(R.string.smtfp_select_destination))) {
|
||||
if (destinationPath.equals(getResources().getString(R.string.select_destination))) {
|
||||
Utils.showToast(getContext(), R.string.please_select_destination);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ class ItemsAdapter(context: Context, private val mItems: List<FileDirItem>) : Ba
|
|||
|
||||
private fun getChildrenCnt(item: FileDirItem): String {
|
||||
val children = item.children
|
||||
return mRes.getQuantityString(R.plurals.smtfp_items, children, children)
|
||||
return mRes.getQuantityString(R.plurals.items, children, children)
|
||||
}
|
||||
|
||||
override fun getCount(): Int {
|
||||
|
|
|
@ -37,7 +37,7 @@ class PropertiesDialog : DialogFragment() {
|
|||
val builder = AlertDialog.Builder(context)
|
||||
builder.setTitle(resources.getString(title))
|
||||
builder.setView(infoView)
|
||||
builder.setPositiveButton(R.string.smtfp_ok, null)
|
||||
builder.setPositiveButton(R.string.ok, null)
|
||||
|
||||
return builder.create()
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
android:paddingBottom="@dimen/smtfp_small_margin"
|
||||
android:paddingRight="@dimen/smtfp_small_margin"
|
||||
android:paddingTop="@dimen/smtfp_small_margin"
|
||||
android:text="@string/smtfp_select_destination"/>
|
||||
android:text="@string/select_destination"/>
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/dialog_radio_group"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.simplemobiletools.filemanager.dialogs
|
||||
package com.simplemobiletools.filepicker.dialogs
|
||||
|
||||
import android.app.Activity
|
||||
import android.app.Dialog
|
||||
|
@ -7,18 +7,19 @@ import android.os.Bundle
|
|||
import android.support.v4.app.DialogFragment
|
||||
import android.support.v7.app.AlertDialog
|
||||
import android.view.View
|
||||
import com.simplemobiletools.filemanager.Config
|
||||
import com.simplemobiletools.filemanager.R
|
||||
import com.simplemobiletools.filemanager.Utils
|
||||
import com.simplemobiletools.filemanager.adapters.ItemsAdapter
|
||||
import com.simplemobiletools.filemanager.fragments.ItemsFragment
|
||||
import com.simplemobiletools.filepicker.R
|
||||
import com.simplemobiletools.filepicker.adapters.ItemsAdapter
|
||||
import com.simplemobiletools.filepicker.extensions.getFilenameFromPath
|
||||
import com.simplemobiletools.filepicker.models.FileDirItem
|
||||
import kotlinx.android.synthetic.main.directory_picker.view.*
|
||||
import kotlinx.android.synthetic.main.smtfp_directory_picker.view.*
|
||||
import java.io.File
|
||||
import java.util.*
|
||||
import kotlin.comparisons.compareBy
|
||||
|
||||
class SelectFolderDialog : DialogFragment() {
|
||||
val SELECT_FOLDER_REQUEST = 1
|
||||
val SELECT_FOLDER_PATH = "path"
|
||||
|
||||
companion object {
|
||||
lateinit var mPath: String
|
||||
var mFirstUpdate: Boolean = true
|
||||
|
@ -71,8 +72,8 @@ class SelectFolderDialog : DialogFragment() {
|
|||
|
||||
private fun sendResult() {
|
||||
val intent = Intent()
|
||||
intent.putExtra(ItemsFragment.SELECT_FOLDER_PATH, mPath)
|
||||
targetFragment.onActivityResult(ItemsFragment.SELECT_FOLDER_REQUEST, Activity.RESULT_OK, intent)
|
||||
intent.putExtra(SELECT_FOLDER_PATH, mPath)
|
||||
targetFragment.onActivityResult(SELECT_FOLDER_REQUEST, Activity.RESULT_OK, intent)
|
||||
dismiss()
|
||||
}
|
||||
|
||||
|
@ -85,7 +86,7 @@ class SelectFolderDialog : DialogFragment() {
|
|||
}
|
||||
|
||||
private fun getItems(path: String): List<FileDirItem> {
|
||||
val showHidden = Config.newInstance(context).showHidden
|
||||
val showHidden = false//Config.newInstance(context).showHidden
|
||||
val items = ArrayList<FileDirItem>()
|
||||
val base = File(path)
|
||||
val files = base.listFiles()
|
||||
|
@ -98,7 +99,7 @@ class SelectFolderDialog : DialogFragment() {
|
|||
continue
|
||||
|
||||
val curPath = file.absolutePath
|
||||
val curName = Utils.getFilename(curPath)
|
||||
val curName = curPath.getFilenameFromPath()
|
||||
val size = file.length()
|
||||
|
||||
items.add(FileDirItem(curPath, curName, file.isDirectory, getChildren(file), size))
|
|
@ -1,5 +1,4 @@
|
|||
<resources>
|
||||
<string name="smtfp_app_name">Simple File Picker</string>
|
||||
<string name="smtfp_select_destination">Ziel auswählen</string>
|
||||
<string name="smtfp_initial_breadcrumb">home</string>
|
||||
<string name="smtfp_ok">OK</string>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<resources>
|
||||
<string name="smtfp_app_name">Simple File Picker</string>
|
||||
<string name="smtfp_select_destination">Seleziona destinazione</string>
|
||||
<string name="smtfp_initial_breadcrumb">home</string>
|
||||
<string name="smtfp_ok">OK</string>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<resources>
|
||||
<string name="smtfp_app_name">Simple File Picker</string>
|
||||
<string name="smtfp_select_destination">宛先を選択</string>
|
||||
<string name="smtfp_initial_breadcrumb">ホーム</string>
|
||||
<string name="smtfp_ok">OK</string>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<resources>
|
||||
<string name="smtfp_app_name">Simple File Picker</string>
|
||||
<string name="smtfp_select_destination">Selecionar destino</string>
|
||||
<string name="smtfp_initial_breadcrumb">início</string>
|
||||
<string name="smtfp_ok">OK</string>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<resources>
|
||||
<string name="smtfp_app_name">Simple File Picker</string>
|
||||
<string name="smtfp_select_destination">Välj mål</string>
|
||||
<string name="smtfp_initial_breadcrumb">home</string>
|
||||
<string name="smtfp_ok">OK</string>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<resources>
|
||||
<string name="smtfp_app_name">Simple File Picker</string>
|
||||
<string name="smtfp_select_destination">Select destination</string>
|
||||
<string name="smtfp_initial_breadcrumb">home</string>
|
||||
<string name="smtfp_ok">OK</string>
|
||||
|
|
Loading…
Reference in New Issue