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