1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-26 14:21:16 +00:00

Turned DeviceFragment and FolderFragment into activities

This commit is contained in:
Felix Ableitner 2016-11-11 00:37:27 +09:00
parent 4f41eb7b06
commit a201cd8789
43 changed files with 450 additions and 565 deletions

View file

@ -50,24 +50,17 @@
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.MainActivity" />
</activity>
<activity android:name=".activities.SyncthingSettingsActivity"
android:label="@string/settings_title"
android:parentActivityName=".activities.MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.MainActivity" />
</activity>
<activity
android:name=".activities.LogActivity"
android:label="@string/log_title"
android:parentActivityName=".activities.SyncthingSettingsActivity">
android:parentActivityName=".activities.SettingsActivity">
<intent-filter>
<action android:name=".activities.LogActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.SyncthingSettingsActivity" />
android:value=".activities.SettingsActivity" />
</activity>
<activity
android:name=".activities.FolderPickerActivity"
@ -79,6 +72,18 @@
<activity android:name=".activities.RestartActivity"
android:theme="@style/Theme.Syncthing.Translucent"
android:launchMode="singleTop"/>
<activity android:name=".activities.DeviceActivity"
android:parentActivityName=".activities.MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.MainActivity" />
</activity>
<activity android:name=".activities.FolderActivity"
android:parentActivityName=".activities.MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.MainActivity" />
</activity>
<activity android:name=".activities.SettingsActivity"
android:parentActivityName=".activities.MainActivity">
<meta-data

View file

@ -1,12 +1,10 @@
package com.nutomic.syncthingandroid.fragments;
package com.nutomic.syncthingandroid.activities;
import android.app.Fragment;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.SwitchCompat;
@ -24,8 +22,6 @@ import com.google.gson.Gson;
import com.google.zxing.integration.android.IntentIntegrator;
import com.google.zxing.integration.android.IntentResult;
import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.activities.SyncthingSettingsActivity;
import com.nutomic.syncthingandroid.activities.SyncthingActivity;
import com.nutomic.syncthingandroid.model.Connection;
import com.nutomic.syncthingandroid.model.Device;
import com.nutomic.syncthingandroid.service.SyncthingService;
@ -48,17 +44,17 @@ import static com.nutomic.syncthingandroid.util.Compression.METADATA;
/**
* Shows device details and allows changing them.
*/
public class DeviceFragment extends Fragment implements View.OnClickListener {
public class DeviceActivity extends SyncthingActivity implements View.OnClickListener {
public static final String EXTRA_DEVICE_ID =
"com.nutomic.syncthingandroid.fragments.DeviceFragment.DEVICE_ID";
"com.nutomic.syncthingandroid.activities.DeviceActivity.DEVICE_ID";
public static final String EXTRA_IS_CREATE =
"com.nutomic.syncthingandroid.activities.DeviceActivity.IS_CREATE";
private static final String TAG = "DeviceSettingsFragment";
public static final List<String> DYNAMIC_ADDRESS = Collections.singletonList("dynamic");
private SyncthingService mSyncthingService;
private Device mDevice;
private View mIdContainer;
@ -92,11 +88,11 @@ public class DeviceFragment extends Fragment implements View.OnClickListener {
Compression compression = Compression.fromIndex(which);
// Don't pop the restart dialog unless the value is actually different.
if (compression != Compression.fromValue(getActivity(), mDevice.compression)) {
if (compression != Compression.fromValue(DeviceActivity.this, mDevice.compression)) {
mDeviceNeedsToUpdate = true;
mDevice.compression = compression.getValue(getActivity());
mCompressionValueView.setText(compression.getTitle(getActivity()));
mDevice.compression = compression.getValue(DeviceActivity.this);
mCompressionValueView.setText(compression.getTitle(DeviceActivity.this));
}
}
};
@ -148,12 +144,25 @@ public class DeviceFragment extends Fragment implements View.OnClickListener {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.fragment_device);
SyncthingSettingsActivity activity = (SyncthingSettingsActivity) getActivity();
mIsCreateMode = activity.getIsCreate();
activity.registerOnServiceConnectedListener(this::onServiceConnected);
activity.setTitle(mIsCreateMode ? R.string.add_device : R.string.edit_device);
setHasOptionsMenu(true);
mIsCreateMode = getIntent().getBooleanExtra(EXTRA_IS_CREATE, false);
registerOnServiceConnectedListener(this::onServiceConnected);
setTitle(mIsCreateMode ? R.string.add_device : R.string.edit_device);
mIdContainer = findViewById(R.id.idContainer);
mIdView = (EditText) findViewById(R.id.id);
mQrButton = findViewById(R.id.qrButton);
mNameView = (EditText) findViewById(R.id.name);
mAddressesView = (EditText) findViewById(R.id.addresses);
mCurrentAddressView = (TextView) findViewById(R.id.currentAddress);
mCompressionContainer = findViewById(R.id.compressionContainer);
mCompressionValueView = (TextView) findViewById(R.id.compressionValue);
mIntroducerView = (SwitchCompat) findViewById(R.id.introducer);
mSyncthingVersionView = (TextView) findViewById(R.id.syncthingVersion);
mQrButton.setOnClickListener(this);
mCompressionContainer.setOnClickListener(this);
if (mIsCreateMode) {
if (savedInstanceState != null) {
@ -163,14 +172,20 @@ public class DeviceFragment extends Fragment implements View.OnClickListener {
initDevice();
}
}
else {
prepareEditMode();
}
}
@Override
public void onDestroy() {
super.onDestroy();
if (mSyncthingService != null) {
mSyncthingService.unregisterOnApiChangeListener(this::onApiChange);
if (getService() != null) {
getService().unregisterOnApiChangeListener(this::onApiChange);
}
mIdView.removeTextChangedListener(mIdTextWatcher);
mNameView.removeTextChangedListener(mNameTextWatcher);
mAddressesView.removeTextChangedListener(mAddressesTextWatcher);
}
@Override
@ -193,47 +208,8 @@ public class DeviceFragment extends Fragment implements View.OnClickListener {
outState.putString("device", new Gson().toJson(mDevice));
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_device, container, false);
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mIdContainer = view.findViewById(R.id.idContainer);
mIdView = (EditText) view.findViewById(R.id.id);
mQrButton = view.findViewById(R.id.qrButton);
mNameView = (EditText) view.findViewById(R.id.name);
mAddressesView = (EditText) view.findViewById(R.id.addresses);
mCurrentAddressView = (TextView) view.findViewById(R.id.currentAddress);
mCompressionContainer = view.findViewById(R.id.compressionContainer);
mCompressionValueView = (TextView) view.findViewById(R.id.compressionValue);
mIntroducerView = (SwitchCompat) view.findViewById(R.id.introducer);
mSyncthingVersionView = (TextView) view.findViewById(R.id.syncthingVersion);
mQrButton.setOnClickListener(this);
mCompressionContainer.setOnClickListener(this);
if (!mIsCreateMode) {
prepareEditMode();
}
}
@Override
public void onDestroyView() {
super.onDestroyView();
mIdView.removeTextChangedListener(mIdTextWatcher);
mNameView.removeTextChangedListener(mNameTextWatcher);
mAddressesView.removeTextChangedListener(mAddressesTextWatcher);
}
public void onServiceConnected() {
mSyncthingService = ((SyncthingActivity) getActivity()).getService();
mSyncthingService.registerOnApiChangeListener(this::onApiChange);
getService().registerOnApiChangeListener(this::onApiChange);
}
/**
@ -254,28 +230,27 @@ public class DeviceFragment extends Fragment implements View.OnClickListener {
public void onApiChange(SyncthingService.State currentState) {
if (currentState != ACTIVE) {
getActivity().finish();
finish();
return;
}
if (!mIsCreateMode) {
List<Device> devices = mSyncthingService.getApi().getDevices(false);
List<Device> devices = getApi().getDevices(false);
mDevice = null;
for (Device device : devices) {
if (device.deviceID.equals(
getActivity().getIntent().getStringExtra(EXTRA_DEVICE_ID))) {
if (device.deviceID.equals(getIntent().getStringExtra(EXTRA_DEVICE_ID))) {
mDevice = device;
break;
}
}
if (mDevice == null) {
Log.w(TAG, "Device not found in API update, maybe it was deleted?");
getActivity().finish();
finish();
return;
}
}
mSyncthingService.getApi().getConnections(this::onReceiveConnections);
getApi().getConnections(this::onReceiveConnections);
updateViewsAndSetListeners();
}
@ -285,7 +260,7 @@ public class DeviceFragment extends Fragment implements View.OnClickListener {
mIdView.setText(mDevice.deviceID);
mNameView.setText(mDevice.name);
mAddressesView.setText(displayableAddresses());
mCompressionValueView.setText(Compression.fromValue(getActivity(), mDevice.compression).getTitle(getActivity()));
mCompressionValueView.setText(Compression.fromValue(this, mDevice.compression).getTitle(this));
mIntroducerView.setChecked(mDevice.introducer);
// Keep state updated
@ -296,16 +271,17 @@ public class DeviceFragment extends Fragment implements View.OnClickListener {
}
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
inflater.inflate(R.menu.device_settings, menu);
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.device_settings, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public void onPrepareOptionsMenu(Menu menu) {
public boolean onPrepareOptionsMenu(Menu menu) {
menu.findItem(R.id.create).setVisible(mIsCreateMode);
menu.findItem(R.id.share_device_id).setVisible(!mIsCreateMode);
menu.findItem(R.id.remove).setVisible(!mIsCreateMode);
return true;
}
@Override
@ -313,27 +289,27 @@ public class DeviceFragment extends Fragment implements View.OnClickListener {
switch (item.getItemId()) {
case R.id.create:
if (isEmpty(mDevice.deviceID)) {
Toast.makeText(getActivity(), R.string.device_id_required, Toast.LENGTH_LONG)
Toast.makeText(this, R.string.device_id_required, Toast.LENGTH_LONG)
.show();
return true;
}
mSyncthingService.getApi().addDevice(mDevice, error ->
Toast.makeText(getActivity(), error, Toast.LENGTH_LONG).show());
getActivity().finish();
getApi().addDevice(mDevice, error ->
Toast.makeText(this, error, Toast.LENGTH_LONG).show());
finish();
return true;
case R.id.share_device_id:
shareDeviceId(getActivity(), mDevice.deviceID);
shareDeviceId(this, mDevice.deviceID);
return true;
case R.id.remove:
new AlertDialog.Builder(getActivity())
new AlertDialog.Builder(this)
.setMessage(R.string.remove_device_confirm)
.setPositiveButton(android.R.string.yes, (dialogInterface, i) ->
mSyncthingService.getApi().removeDevice(mDevice.deviceID))
getApi().removeDevice(mDevice.deviceID))
.setNegativeButton(android.R.string.no, null)
.show();
return true;
case android.R.id.home:
getActivity().onBackPressed();
onBackPressed();
return true;
default:
return super.onOptionsItemSelected(item);
@ -355,16 +331,16 @@ public class DeviceFragment extends Fragment implements View.OnClickListener {
private void initDevice() {
mDevice = new Device();
mDevice.name = "";
mDevice.deviceID = getActivity().getIntent().getStringExtra(EXTRA_DEVICE_ID);
mDevice.deviceID = getIntent().getStringExtra(EXTRA_DEVICE_ID);
mDevice.addresses = DYNAMIC_ADDRESS;
mDevice.compression = METADATA.getValue(getActivity());
mDevice.compression = METADATA.getValue(this);
mDevice.introducer = false;
}
private void prepareEditMode() {
getActivity().getWindow().setSoftInputMode(SOFT_INPUT_STATE_ALWAYS_HIDDEN);
getWindow().setSoftInputMode(SOFT_INPUT_STATE_ALWAYS_HIDDEN);
Drawable dr = ContextCompat.getDrawable(getActivity(), R.drawable.ic_content_copy_black_24dp);
Drawable dr = ContextCompat.getDrawable(this, R.drawable.ic_content_copy_black_24dp);
mIdView.setCompoundDrawablesWithIntrinsicBounds(null, null, dr, null);
mIdView.setEnabled(false);
mQrButton.setVisibility(GONE);
@ -377,7 +353,7 @@ public class DeviceFragment extends Fragment implements View.OnClickListener {
*/
private void updateDevice() {
if (!mIsCreateMode && mDeviceNeedsToUpdate && mDevice != null) {
mSyncthingService.getApi().editDevice(mDevice);
getApi().editDevice(mDevice);
}
}
@ -397,17 +373,17 @@ public class DeviceFragment extends Fragment implements View.OnClickListener {
@Override
public void onClick(View v) {
if (v.equals(mCompressionContainer)) {
new AlertDialog.Builder(getActivity())
new AlertDialog.Builder(this)
.setTitle(R.string.compression)
.setSingleChoiceItems(R.array.compress_entries,
Compression.fromValue(getActivity(), mDevice.compression).getIndex(),
Compression.fromValue(this, mDevice.compression).getIndex(),
mCompressionEntrySelectedListener)
.show();
} else if (v.equals(mQrButton)){
IntentIntegrator integrator = new IntentIntegrator(DeviceFragment.this);
IntentIntegrator integrator = new IntentIntegrator(DeviceActivity.this);
integrator.initiateScan();
} else if (v.equals(mIdContainer)) {
Util.copyDeviceId(getActivity(), mDevice.deviceID);
Util.copyDeviceId(this, mDevice.deviceID);
}
}
@ -422,4 +398,18 @@ public class DeviceFragment extends Fragment implements View.OnClickListener {
context.startActivity(Intent.createChooser(
shareIntent, context.getString(R.string.send_device_id_to)));
}
@Override
public void onBackPressed() {
if (mIsCreateMode) {
new AlertDialog.Builder(this)
.setMessage(R.string.dialog_discard_changes)
.setPositiveButton(android.R.string.ok, (dialog, which) -> finish())
.setNegativeButton(android.R.string.cancel, null)
.show();
}
else {
super.onBackPressed();
}
}
}

View file

@ -1,11 +1,9 @@
package com.nutomic.syncthingandroid.fragments;
package com.nutomic.syncthingandroid.activities;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.SwitchCompat;
import android.text.Editable;
import android.text.TextUtils;
@ -14,7 +12,6 @@ import android.util.Log;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
@ -28,9 +25,6 @@ import com.google.common.base.Objects;
import com.google.common.collect.ImmutableList;
import com.google.gson.Gson;
import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.activities.FolderPickerActivity;
import com.nutomic.syncthingandroid.activities.SyncthingSettingsActivity;
import com.nutomic.syncthingandroid.activities.SyncthingActivity;
import com.nutomic.syncthingandroid.fragments.dialog.KeepVersionsDialogFragment;
import com.nutomic.syncthingandroid.model.Device;
import com.nutomic.syncthingandroid.model.Folder;
@ -50,17 +44,17 @@ import static java.lang.String.valueOf;
/**
* Shows folder details and allows changing them.
*/
public class FolderFragment extends Fragment
public class FolderActivity extends SyncthingActivity
implements SyncthingActivity.OnServiceConnectedListener, SyncthingService.OnApiChangeListener {
public static final String EXTRA_IS_CREATE =
"com.nutomic.syncthingandroid.activities.DeviceActivity.IS_CREATE";
public static final String EXTRA_FOLDER_ID =
"com.nutomic.syncthingandroid.fragments.FolderFragment.FOLDER_ID";
"com.nutomic.syncthingandroid.activities.FolderActivity.FOLDER_ID";
public static final String EXTRA_FOLDER_LABEL =
"com.nutomic.syncthingandroid.fragments.FolderFragment.FOLDER_LABEL";
"com.nutomic.syncthingandroid.activities.FolderActivity.FOLDER_LABEL";
public static final String EXTRA_DEVICE_ID =
"com.nutomic.syncthingandroid.fragments.FolderFragment.DEVICE_ID";
"com.nutomic.syncthingandroid.activities.FolderActivity.DEVICE_ID";
private static final int DIRECTORY_REQUEST_CODE = 234;
@ -68,8 +62,6 @@ public class FolderFragment extends Fragment
public static final String KEEP_VERSIONS_DIALOG_TAG = "KeepVersionsDialogFragment";
private SyncthingService mSyncthingService;
private Folder mFolder;
private EditText mLabelView;
@ -137,7 +129,7 @@ public class FolderFragment extends Fragment
private final View.OnClickListener mPathViewClickListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(getActivity(), FolderPickerActivity.class);
Intent intent = new Intent(FolderActivity.this, FolderPickerActivity.class);
if (!TextUtils.isEmpty(mFolder.path)) {
intent.putExtra(FolderPickerActivity.EXTRA_INITIAL_DIRECTORY, mFolder.path);
}
@ -148,12 +140,22 @@ public class FolderFragment extends Fragment
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.fragment_folder);
SyncthingSettingsActivity activity = (SyncthingSettingsActivity) getActivity();
mIsCreateMode = activity.getIsCreate();
activity.setTitle(mIsCreateMode ? R.string.create_folder : R.string.edit_folder);
activity.registerOnServiceConnectedListener(this);
setHasOptionsMenu(true);
mIsCreateMode = getIntent().getBooleanExtra(EXTRA_IS_CREATE, false);
setTitle(mIsCreateMode ? R.string.create_folder : R.string.edit_folder);
registerOnServiceConnectedListener(this);
mLabelView = (EditText) findViewById(R.id.label);
mIdView = (EditText) findViewById(R.id.id);
mPathView = (TextView) findViewById(R.id.directory);
mFolderMasterView = (SwitchCompat) findViewById(R.id.master);
mVersioningKeepView = (TextView) findViewById(R.id.versioningKeep);
mDevicesContainer = (ViewGroup) findViewById(R.id.devicesContainer);
mPathView.setOnClickListener(mPathViewClickListener);
findViewById(R.id.versioningContainer).setOnClickListener(v ->
mKeepVersionsDialogFragment.show(getFragmentManager(), KEEP_VERSIONS_DIALOG_TAG));
if (mIsCreateMode) {
if (savedInstanceState != null) {
@ -162,15 +164,23 @@ public class FolderFragment extends Fragment
if (mFolder == null) {
initFolder();
}
// Open keyboard on label view in edit mode.
mLabelView.requestFocus();
}
else {
prepareEditMode();
}
}
@Override
public void onDestroy() {
super.onDestroy();
if (mSyncthingService != null) {
mSyncthingService.unregisterOnApiChangeListener(this);
if (getService() != null) {
getService().unregisterOnApiChangeListener(this);
}
mLabelView.removeTextChangedListener(mTextWatcher);
mIdView.removeTextChangedListener(mTextWatcher);
mPathView.removeTextChangedListener(mTextWatcher);
}
@Override
@ -193,57 +203,21 @@ public class FolderFragment extends Fragment
outState.putString("folder", new Gson().toJson(mFolder));
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_folder, container, false);
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mLabelView = (EditText) view.findViewById(R.id.label);
mIdView = (EditText) view.findViewById(R.id.id);
mPathView = (TextView) view.findViewById(R.id.directory);
mFolderMasterView = (SwitchCompat) view.findViewById(R.id.master);
mVersioningKeepView = (TextView) view.findViewById(R.id.versioningKeep);
mDevicesContainer = (ViewGroup) view.findViewById(R.id.devicesContainer);
mPathView.setOnClickListener(mPathViewClickListener);
view.findViewById(R.id.versioningContainer).setOnClickListener(v -> mKeepVersionsDialogFragment.show(getFragmentManager(), KEEP_VERSIONS_DIALOG_TAG));
if (mIsCreateMode) {
// Open keyboard on label view in edit mode.
mLabelView.requestFocus();
} else {
prepareEditMode();
}
}
@Override
public void onDestroyView() {
super.onDestroyView();
mLabelView.removeTextChangedListener(mTextWatcher);
mIdView.removeTextChangedListener(mTextWatcher);
mPathView.removeTextChangedListener(mTextWatcher);
}
@Override
public void onServiceConnected() {
mSyncthingService = ((SyncthingActivity) getActivity()).getService();
mSyncthingService.registerOnApiChangeListener(this);
getService().registerOnApiChangeListener(this);
}
@Override
public void onApiChange(SyncthingService.State currentState) {
if (currentState != ACTIVE) {
getActivity().finish();
finish();
return;
}
if (!mIsCreateMode) {
List<Folder> folders = mSyncthingService.getApi().getFolders();
String passedId = getActivity().getIntent().getStringExtra(EXTRA_FOLDER_ID);
List<Folder> folders = getApi().getFolders();
String passedId = getIntent().getStringExtra(EXTRA_FOLDER_ID);
mFolder = null;
for (Folder currentFolder : folders) {
if (currentFolder.id.equals(passedId)) {
@ -253,7 +227,7 @@ public class FolderFragment extends Fragment
}
if (mFolder == null) {
Log.w(TAG, "Folder not found in API update, maybe it was deleted?");
getActivity().finish();
finish();
return;
}
}
@ -273,14 +247,14 @@ public class FolderFragment extends Fragment
mIdView.setText(mFolder.id);
mPathView.setText(mFolder.path);
mFolderMasterView.setChecked(Objects.equal(mFolder.type, "readonly"));
List<Device> devicesList = mSyncthingService.getApi().getDevices(false);
List<Device> devicesList = getApi().getDevices(false);
mDevicesContainer.removeAllViews();
if (devicesList.isEmpty()) {
addEmptyDeviceListView();
} else {
for (Device n : devicesList) {
addDeviceViewAndSetListener(n, LayoutInflater.from(getActivity()));
addDeviceViewAndSetListener(n, getLayoutInflater());
}
}
@ -303,15 +277,16 @@ public class FolderFragment extends Fragment
}
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
inflater.inflate(R.menu.folder_settings, menu);
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.folder_settings, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public void onPrepareOptionsMenu(Menu menu) {
public boolean onPrepareOptionsMenu(Menu menu) {
menu.findItem(R.id.create).setVisible(mIsCreateMode);
menu.findItem(R.id.remove).setVisible(!mIsCreateMode);
return true;
}
@Override
@ -319,28 +294,28 @@ public class FolderFragment extends Fragment
switch (item.getItemId()) {
case R.id.create:
if (TextUtils.isEmpty(mFolder.id)) {
Toast.makeText(getActivity(), R.string.folder_id_required, Toast.LENGTH_LONG)
Toast.makeText(this, R.string.folder_id_required, Toast.LENGTH_LONG)
.show();
return true;
}
if (TextUtils.isEmpty(mFolder.path)) {
Toast.makeText(getActivity(), R.string.folder_path_required, Toast.LENGTH_LONG)
Toast.makeText(this, R.string.folder_path_required, Toast.LENGTH_LONG)
.show();
return true;
}
mSyncthingService.getApi().addFolder(mFolder);
getActivity().finish();
getApi().addFolder(mFolder);
finish();
return true;
case R.id.remove:
new AlertDialog.Builder(getActivity())
new AlertDialog.Builder(this)
.setMessage(R.string.remove_folder_confirm)
.setPositiveButton(android.R.string.yes, (dialogInterface, i) ->
mSyncthingService.getApi().removeFolder(mFolder.id))
getApi().removeFolder(mFolder.id))
.setNegativeButton(android.R.string.no, null)
.show();
return true;
case android.R.id.home:
getActivity().onBackPressed();
onBackPressed();
return true;
default:
return super.onOptionsItemSelected(item);
@ -358,11 +333,11 @@ public class FolderFragment extends Fragment
private void initFolder() {
mFolder = new Folder();
mFolder.id = getActivity().getIntent().getStringExtra(EXTRA_FOLDER_ID);
mFolder.label = getActivity().getIntent().getStringExtra(EXTRA_FOLDER_LABEL);
mFolder.id = getIntent().getStringExtra(EXTRA_FOLDER_ID);
mFolder.label = getIntent().getStringExtra(EXTRA_FOLDER_LABEL);
mFolder.rescanIntervalS = 259200; // Scan every 3 days (in case inotify dropped some changes)
mFolder.versioning = new Folder.Versioning();
String deviceId = getActivity().getIntent().getStringExtra(EXTRA_DEVICE_ID);
String deviceId = getIntent().getStringExtra(EXTRA_DEVICE_ID);
if (deviceId != null) {
List<String> devices = ImmutableList.<String>builder()
.addAll(mFolder.getDevices())
@ -403,7 +378,21 @@ public class FolderFragment extends Fragment
private void updateFolder() {
if (!mIsCreateMode) {
mSyncthingService.getApi().editFolder(mFolder);
getApi().editFolder(mFolder);
}
}
@Override
public void onBackPressed() {
if (mIsCreateMode) {
new AlertDialog.Builder(this)
.setMessage(R.string.dialog_discard_changes)
.setPositiveButton(android.R.string.ok, (dialog, which) -> finish())
.setNegativeButton(android.R.string.cancel, null)
.show();
}
else {
super.onBackPressed();
}
}
}

View file

@ -1,96 +0,0 @@
package com.nutomic.syncthingandroid.activities;
import android.app.Fragment;
import android.app.FragmentManager;
import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.fragments.DeviceFragment;
import com.nutomic.syncthingandroid.fragments.FolderFragment;
/**
* General Activity used by all PreferenceFragments.
*/
public class SyncthingSettingsActivity extends SyncthingActivity {
public static final String ACTION_DEVICE_SETTINGS =
"com.nutomic.syncthingandroid.activities.SyncthingSettingsActivity.DEVICE_SETTINGS";
public static final String ACTION_FOLDER_SETTINGS =
"com.nutomic.syncthingandroid.activities.SyncthingSettingsActivity.FOLDER_SETTINGS";
/**
* Must be set for {@link #ACTION_DEVICE_SETTINGS} and
* {@link #ACTION_FOLDER_SETTINGS} to determine if an existing folder/device should be
* edited or a new one created.
*/
public static final String EXTRA_IS_CREATE =
"com.nutomic.syncthingandroid.activities.SyncthingSettingsActivity.IS_CREATE";
private Fragment mFragment;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_settings);
FragmentManager fm = getFragmentManager();
if (savedInstanceState != null) {
mFragment = fm.getFragment(savedInstanceState,
savedInstanceState.getString("fragment_name"));
} else {
String action = getIntent().getAction();
switch (action) {
case ACTION_DEVICE_SETTINGS:
assertHasCreateExtra();
mFragment = new DeviceFragment();
break;
case ACTION_FOLDER_SETTINGS:
assertHasCreateExtra();
mFragment = new FolderFragment();
break;
default:
throw new IllegalArgumentException(
"You must provide the requested fragment type as an extra.");
}
}
fm.beginTransaction()
.replace(R.id.content, mFragment)
.commit();
}
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
String fragmentClassName = mFragment.getClass().getName();
outState.putString("fragment_name", fragmentClassName);
FragmentManager fm = getFragmentManager();
fm.putFragment(outState, fragmentClassName, mFragment);
}
private void assertHasCreateExtra() {
if (!getIntent().hasExtra(EXTRA_IS_CREATE))
throw new IllegalArgumentException("EXTRA_IS_CREATE must be set");
}
public boolean getIsCreate() {
return getIntent().getBooleanExtra(EXTRA_IS_CREATE, false);
}
@Override
public void onBackPressed() {
if (getIsCreate() && (mFragment instanceof DeviceFragment || mFragment instanceof FolderFragment)) {
new AlertDialog.Builder(this)
.setMessage(R.string.dialog_discard_changes)
.setPositiveButton(android.R.string.ok, (dialog, which) -> finish())
.setNegativeButton(android.R.string.cancel, null)
.show();
}
else {
finish();
}
}
}

View file

@ -11,7 +11,7 @@ import android.widget.AdapterView;
import android.widget.ListView;
import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.activities.SyncthingSettingsActivity;
import com.nutomic.syncthingandroid.activities.DeviceActivity;
import com.nutomic.syncthingandroid.activities.SyncthingActivity;
import com.nutomic.syncthingandroid.model.Device;
import com.nutomic.syncthingandroid.service.SyncthingService;
@ -98,10 +98,9 @@ public class DeviceListFragment extends ListFragment implements SyncthingService
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
Intent intent = new Intent(getActivity(), SyncthingSettingsActivity.class);
intent.setAction(SyncthingSettingsActivity.ACTION_DEVICE_SETTINGS);
intent.putExtra(SyncthingSettingsActivity.EXTRA_IS_CREATE, false);
intent.putExtra(DeviceFragment.EXTRA_DEVICE_ID, mAdapter.getItem(i).deviceID);
Intent intent = new Intent(getActivity(), DeviceActivity.class);
intent.putExtra(DeviceActivity.EXTRA_IS_CREATE, false);
intent.putExtra(DeviceActivity.EXTRA_DEVICE_ID, mAdapter.getItem(i).deviceID);
startActivity(intent);
}
@ -114,9 +113,8 @@ public class DeviceListFragment extends ListFragment implements SyncthingService
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.add_device:
Intent intent = new Intent(getActivity(), SyncthingSettingsActivity.class)
.setAction(SyncthingSettingsActivity.ACTION_DEVICE_SETTINGS)
.putExtra(SyncthingSettingsActivity.EXTRA_IS_CREATE, true);
Intent intent = new Intent(getActivity(), DeviceActivity.class)
.putExtra(DeviceActivity.EXTRA_IS_CREATE, true);
startActivity(intent);
return true;
default:

View file

@ -14,7 +14,6 @@ import com.google.common.base.Optional;
import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.activities.MainActivity;
import com.nutomic.syncthingandroid.activities.SettingsActivity;
import com.nutomic.syncthingandroid.activities.SyncthingSettingsActivity;
import com.nutomic.syncthingandroid.activities.WebGuiActivity;
import com.nutomic.syncthingandroid.model.Connection;
import com.nutomic.syncthingandroid.model.SystemInfo;

View file

@ -11,7 +11,7 @@ import android.view.View;
import android.widget.AdapterView;
import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.activities.SyncthingSettingsActivity;
import com.nutomic.syncthingandroid.activities.FolderActivity;
import com.nutomic.syncthingandroid.activities.SyncthingActivity;
import com.nutomic.syncthingandroid.model.Folder;
import com.nutomic.syncthingandroid.service.SyncthingService;
@ -107,10 +107,9 @@ public class FolderListFragment extends ListFragment implements SyncthingService
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
Intent intent = new Intent(getActivity(), SyncthingSettingsActivity.class)
.setAction(SyncthingSettingsActivity.ACTION_FOLDER_SETTINGS)
.putExtra(SyncthingSettingsActivity.EXTRA_IS_CREATE, false)
.putExtra(FolderFragment.EXTRA_FOLDER_ID, mAdapter.getItem(i).id);
Intent intent = new Intent(getActivity(), FolderActivity.class)
.putExtra(FolderActivity.EXTRA_IS_CREATE, false)
.putExtra(FolderActivity.EXTRA_FOLDER_ID, mAdapter.getItem(i).id);
startActivity(intent);
}
@ -135,9 +134,8 @@ public class FolderListFragment extends ListFragment implements SyncthingService
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.add_folder:
Intent intent = new Intent(getActivity(), SyncthingSettingsActivity.class)
.setAction(SyncthingSettingsActivity.ACTION_FOLDER_SETTINGS)
.putExtra(SyncthingSettingsActivity.EXTRA_IS_CREATE, true);
Intent intent = new Intent(getActivity(), FolderActivity.class)
.putExtra(FolderActivity.EXTRA_IS_CREATE, true);
startActivity(intent);
return true;
default:

View file

@ -14,9 +14,8 @@ import android.support.v4.app.NotificationCompat;
import android.util.Log;
import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.activities.SyncthingSettingsActivity;
import com.nutomic.syncthingandroid.fragments.DeviceFragment;
import com.nutomic.syncthingandroid.fragments.FolderFragment;
import com.nutomic.syncthingandroid.activities.DeviceActivity;
import com.nutomic.syncthingandroid.activities.FolderActivity;
import com.nutomic.syncthingandroid.model.Device;
import com.nutomic.syncthingandroid.model.Event;
import com.nutomic.syncthingandroid.model.Folder;
@ -94,10 +93,9 @@ public class EventProcessor implements SyncthingService.OnWebGuiAvailableListene
String deviceId = (String) event.data.get("device");
Log.d(TAG, "Unknwon device " + deviceId + " wants to connect");
Intent intent = new Intent(mContext, SyncthingSettingsActivity.class)
.setAction(SyncthingSettingsActivity.ACTION_DEVICE_SETTINGS)
.putExtra(SyncthingSettingsActivity.EXTRA_IS_CREATE, true)
.putExtra(DeviceFragment.EXTRA_DEVICE_ID, deviceId);
Intent intent = new Intent(mContext, DeviceActivity.class)
.putExtra(DeviceActivity.EXTRA_IS_CREATE, true)
.putExtra(DeviceActivity.EXTRA_DEVICE_ID, deviceId);
// HACK: Use a random, deterministic ID to make multiple PendingIntents
// distinguishable
int requestCode = deviceId.hashCode();
@ -114,12 +112,11 @@ public class EventProcessor implements SyncthingService.OnWebGuiAvailableListene
String folderLabel = (String) event.data.get("folderLabel");
Log.d(TAG, "Device " + deviceId + " wants to share folder " + folderId);
intent = new Intent(mContext, SyncthingSettingsActivity.class)
.setAction(SyncthingSettingsActivity.ACTION_FOLDER_SETTINGS)
.putExtra(SyncthingSettingsActivity.EXTRA_IS_CREATE, true)
.putExtra(FolderFragment.EXTRA_DEVICE_ID, deviceId)
.putExtra(FolderFragment.EXTRA_FOLDER_ID, folderId)
.putExtra(FolderFragment.EXTRA_FOLDER_LABEL, folderLabel);
intent = new Intent(mContext, FolderActivity.class)
.putExtra(FolderActivity.EXTRA_IS_CREATE, true)
.putExtra(FolderActivity.EXTRA_DEVICE_ID, deviceId)
.putExtra(FolderActivity.EXTRA_FOLDER_ID, folderId)
.putExtra(FolderActivity.EXTRA_FOLDER_LABEL, folderLabel);
// HACK: Use a random, deterministic ID to make multiple PendingIntents
// distinguishable
requestCode = (deviceId + folderId + folderLabel).hashCode();

View file

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/widget_toolbar" />
<FrameLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>

View file

@ -1,134 +1,143 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".fragments.DeviceFragment">
tools:context=".activities.DeviceActivity">
<LinearLayout
<include layout="@layout/widget_toolbar" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="?android:listDivider"
android:orientation="vertical"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:showDividers="middle">
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/idContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:orientation="horizontal">
android:divider="?android:listDivider"
android:orientation="vertical"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:showDividers="middle">
<com.nutomic.syncthingandroid.views.EnhancedEditText
android:id="@+id/id"
<LinearLayout
android:id="@+id/idContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:orientation="horizontal">
<com.nutomic.syncthingandroid.views.EnhancedEditText
android:id="@+id/id"
style="@style/Widget.Syncthing.TextView.Label.Details.Field"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawableLeft="@drawable/ic_cellphone_black_24dp"
android:drawableStart="@drawable/ic_cellphone_black_24dp"
android:hint="@string/device_id"
android:imeOptions="actionNext"
android:inputType="textNoSuggestions|textMultiLine"
android:nextFocusForward="@+id/name" />
<ImageView
android:id="@+id/qrButton"
style="?actionButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="@dimen/abc_action_bar_content_inset_material"
android:layout_marginRight="@dimen/abc_action_bar_content_inset_material"
android:contentDescription="@string/scan_qr_code_description"
android:src="@drawable/ic_qrcode_black_24dp_active" />
</LinearLayout>
<EditText
android:id="@+id/name"
style="@style/Widget.Syncthing.TextView.Label.Details.Field"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawableLeft="@drawable/ic_cellphone_black_24dp"
android:drawableStart="@drawable/ic_cellphone_black_24dp"
android:hint="@string/device_id"
android:drawableLeft="@drawable/ic_tag_text_outline_black_24dp_active"
android:drawableStart="@drawable/ic_tag_text_outline_black_24dp_active"
android:hint="@string/name"
android:imeOptions="actionNext"
android:inputType="textNoSuggestions|textMultiLine"
android:nextFocusForward="@+id/name" />
android:inputType="textCapWords" />
<ImageView
android:id="@+id/qrButton"
style="?actionButtonStyle"
android:layout_width="wrap_content"
<EditText
android:id="@+id/addresses"
style="@style/Widget.Syncthing.TextView.Label.Details.Field"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="@dimen/abc_action_bar_content_inset_material"
android:layout_marginRight="@dimen/abc_action_bar_content_inset_material"
android:contentDescription="@string/scan_qr_code_description"
android:src="@drawable/ic_qrcode_black_24dp_active" />
</LinearLayout>
android:drawableLeft="@drawable/ic_link_black_24dp_active"
android:drawableStart="@drawable/ic_link_black_24dp_active"
android:hint="@string/addresses"
android:imeOptions="actionDone"
android:inputType="textNoSuggestions"/>
<EditText
android:id="@+id/name"
style="@style/Widget.Syncthing.TextView.Label.Details.Field"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_tag_text_outline_black_24dp_active"
android:drawableStart="@drawable/ic_tag_text_outline_black_24dp_active"
android:hint="@string/name"
android:imeOptions="actionNext"
android:inputType="textCapWords" />
<LinearLayout
android:id="@+id/compressionContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:orientation="horizontal">
<EditText
android:id="@+id/addresses"
style="@style/Widget.Syncthing.TextView.Label.Details.Field"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_link_black_24dp_active"
android:drawableStart="@drawable/ic_link_black_24dp_active"
android:hint="@string/addresses"
android:imeOptions="actionDone"
android:inputType="textNoSuggestions"/>
<TextView
style="@style/Widget.Syncthing.TextView.Label.Details"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@null"
android:checked="false"
android:drawableLeft="@drawable/ic_zip_box_black_24dp_active"
android:drawableStart="@drawable/ic_zip_box_black_24dp_active"
android:text="@string/compression" />
<LinearLayout
android:id="@+id/compressionContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:orientation="horizontal">
<TextView
android:id="@+id/compressionValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/abc_action_bar_content_inset_material"
android:layout_marginRight="@dimen/abc_action_bar_content_inset_material"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
tools:ignore="HardcodedText" />
</LinearLayout>
<TextView
<android.support.v7.widget.SwitchCompat
android:id="@+id/introducer"
style="@style/Widget.Syncthing.TextView.Label.Details"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@null"
android:checked="false"
android:drawableLeft="@drawable/ic_zip_box_black_24dp_active"
android:drawableStart="@drawable/ic_zip_box_black_24dp_active"
android:text="@string/compression" />
android:drawableLeft="@drawable/ic_phonelink_black_24dp_active"
android:drawableStart="@drawable/ic_phonelink_black_24dp_active"
android:text="@string/introducer" />
<TextView
android:id="@+id/compressionValue"
android:layout_width="wrap_content"
android:id="@+id/currentAddress"
style="@style/Widget.Syncthing.TextView.Label.Details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/abc_action_bar_content_inset_material"
android:layout_marginRight="@dimen/abc_action_bar_content_inset_material"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
tools:ignore="HardcodedText" />
android:drawableLeft="@drawable/ic_info_black_24dp_inactive"
android:drawableStart="@drawable/ic_info_black_24dp_inactive"
android:enabled="false"
android:hint="@string/current_address"
android:visibility="gone"
tools:visibility="visible" />
<TextView
android:id="@+id/syncthingVersion"
style="@style/Widget.Syncthing.TextView.Label.Details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="72dp"
android:paddingStart="72dp"
android:enabled="false"
android:hint="@string/syncthing_version_title"
android:visibility="gone"
tools:visibility="visible"
tools:ignore="RtlSymmetry"/>
</LinearLayout>
</ScrollView>
<android.support.v7.widget.SwitchCompat
android:id="@+id/introducer"
style="@style/Widget.Syncthing.TextView.Label.Details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="false"
android:drawableLeft="@drawable/ic_phonelink_black_24dp_active"
android:drawableStart="@drawable/ic_phonelink_black_24dp_active"
android:text="@string/introducer" />
<TextView
android:id="@+id/currentAddress"
style="@style/Widget.Syncthing.TextView.Label.Details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_info_black_24dp_inactive"
android:drawableStart="@drawable/ic_info_black_24dp_inactive"
android:enabled="false"
android:hint="@string/current_address"
android:visibility="gone"
tools:visibility="visible" />
<TextView
android:id="@+id/syncthingVersion"
style="@style/Widget.Syncthing.TextView.Label.Details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="72dp"
android:paddingStart="72dp"
android:enabled="false"
android:hint="@string/syncthing_version_title"
android:visibility="gone"
tools:visibility="visible"
tools:ignore="RtlSymmetry"/>
</LinearLayout>
</ScrollView>
</LinearLayout>

View file

@ -1,103 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".fragments.FolderFragment">
tools:context=".activities.FolderActivity">
<LinearLayout
<include layout="@layout/widget_toolbar" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="?android:listDivider"
android:orientation="vertical"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:showDividers="middle"
android:focusableInTouchMode="true">
<EditText
android:id="@+id/label"
style="@style/Widget.Syncthing.TextView.Label.Details.Field"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_label_outline_black_24dp"
android:drawableStart="@drawable/ic_label_outline_black_24dp"
android:hint="@string/folder_label"
android:imeOptions="actionDone"
android:inputType="textCapWords|textNoSuggestions" />
<EditText
android:id="@+id/id"
style="@style/Widget.Syncthing.TextView.Label.Details.Field"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_vpn_key_black_24dp"
android:drawableStart="@drawable/ic_vpn_key_black_24dp"
android:hint="@string/folder_id"
android:imeOptions="actionDone"
android:inputType="textCapWords" />
<TextView
android:id="@+id/directory"
style="@style/Widget.Syncthing.TextView.Label.Details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_folder_black_24dp"
android:drawableStart="@drawable/ic_folder_black_24dp"
android:focusable="true"
android:hint="@string/directory" />
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/devicesContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:divider="?android:listDivider"
android:orientation="vertical"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:showDividers="middle"
android:focusableInTouchMode="true">
<EditText
android:id="@+id/label"
style="@style/Widget.Syncthing.TextView.Label.Details.Field"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_label_outline_black_24dp"
android:drawableStart="@drawable/ic_label_outline_black_24dp"
android:hint="@string/folder_label"
android:imeOptions="actionDone"
android:inputType="textCapWords|textNoSuggestions" />
<EditText
android:id="@+id/id"
style="@style/Widget.Syncthing.TextView.Label.Details.Field"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_vpn_key_black_24dp"
android:drawableStart="@drawable/ic_vpn_key_black_24dp"
android:hint="@string/folder_id"
android:imeOptions="actionDone"
android:inputType="textCapWords" />
<TextView
android:id="@+id/directory"
style="@style/Widget.Syncthing.TextView.Label.Details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_device_hub_black_24dp_active"
android:drawableStart="@drawable/ic_device_hub_black_24dp_active"
android:text="@string/devices" />
</LinearLayout>
android:drawableLeft="@drawable/ic_folder_black_24dp"
android:drawableStart="@drawable/ic_folder_black_24dp"
android:focusable="true"
android:hint="@string/directory" />
<android.support.v7.widget.SwitchCompat
android:id="@+id/master"
style="@style/Widget.Syncthing.TextView.Label.Details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="false"
android:drawableLeft="@drawable/ic_lock_black_24dp_active"
android:drawableStart="@drawable/ic_lock_black_24dp_active"
android:text="@string/folder_master" />
<LinearLayout
android:id="@+id/devicesContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/versioningContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:orientation="horizontal">
<TextView
style="@style/Widget.Syncthing.TextView.Label.Details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_device_hub_black_24dp_active"
android:drawableStart="@drawable/ic_device_hub_black_24dp_active"
android:text="@string/devices" />
</LinearLayout>
<TextView
<android.support.v7.widget.SwitchCompat
android:id="@+id/master"
style="@style/Widget.Syncthing.TextView.Label.Details"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@null"
android:checked="false"
android:drawableLeft="@drawable/ic_history_black_24dp_active"
android:drawableStart="@drawable/ic_history_black_24dp_active"
android:text="@string/keep_versions" />
android:drawableLeft="@drawable/ic_lock_black_24dp_active"
android:drawableStart="@drawable/ic_lock_black_24dp_active"
android:text="@string/folder_master" />
<TextView
android:id="@+id/versioningKeep"
android:layout_width="wrap_content"
<LinearLayout
android:id="@+id/versioningContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/abc_action_bar_content_inset_material"
android:layout_marginRight="@dimen/abc_action_bar_content_inset_material"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
tools:ignore="HardcodedText" />
android:background="?selectableItemBackground"
android:orientation="horizontal">
<TextView
style="@style/Widget.Syncthing.TextView.Label.Details"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@null"
android:checked="false"
android:drawableLeft="@drawable/ic_history_black_24dp_active"
android:drawableStart="@drawable/ic_history_black_24dp_active"
android:text="@string/keep_versions" />
<TextView
android:id="@+id/versioningKeep"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/abc_action_bar_content_inset_material"
android:layout_marginRight="@dimen/abc_action_bar_content_inset_material"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
tools:ignore="HardcodedText" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
</ScrollView>
</LinearLayout>

View file

@ -26,7 +26,7 @@
<!--Title for current CPU usage-->
<!--Title for current RAM usage-->
<!--Title for announce server status-->
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<!--Setting title-->
<!--Setting title-->
@ -40,7 +40,7 @@
<!--Dialog shown when attempting to remove a folder-->
<!--Toast shown when trying to create a folder with an empty ID-->
<!--Toast shown when trying to create a folder with an empty path-->
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<!--Setting title-->
<!--Setting title-->

View file

@ -60,7 +60,7 @@
<!--Title for announce server status-->
<string name="announce_server">Сървър за откриване на устройства</string>
<string name="restart">Рестартиране</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">Идентификатор на папката</string>
<!--Setting title-->
@ -86,7 +86,7 @@
<string name="folder_id_required">Наложително е да въведете идентификатор на папката</string>
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">Наложително е да въведете път до папката</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">Идентификатор на устройството</string>
<!--Setting title-->

View file

@ -62,7 +62,7 @@
<string name="announce_server">Globální oznamování</string>
<string name="restart">Restart</string>
<string name="dialog_confirm_restart">Opravdu chcete restartovat Syncthing?</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">ID adresáře</string>
<!--Setting title-->
@ -90,7 +90,7 @@
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">Cesta k adresáři nesmí být prázdná</string>
<string name="dialog_discard_changes">Zrušit změny?</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">ID přístroje</string>
<!--Setting title-->

View file

@ -26,7 +26,7 @@
<!--Title for current CPU usage-->
<!--Title for current RAM usage-->
<!--Title for announce server status-->
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<!--Setting title-->
<!--Setting title-->
@ -40,7 +40,7 @@
<!--Dialog shown when attempting to remove a folder-->
<!--Toast shown when trying to create a folder with an empty ID-->
<!--Toast shown when trying to create a folder with an empty path-->
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<!--Setting title-->
<!--Setting title-->

View file

@ -62,7 +62,7 @@
<string name="announce_server">Indexserver</string>
<string name="restart">Neustart</string>
<string name="dialog_confirm_restart">Möchtest du Syncthing neu starten?</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">Verzeichnis-ID</string>
<!--Setting title-->
@ -90,7 +90,7 @@
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">Der Verzeichnispfad darf nicht leer sein</string>
<string name="dialog_discard_changes">Deine Änderungen verwerfen?</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">Geräte-ID</string>
<!--Setting title-->

View file

@ -65,7 +65,7 @@
<string name="announce_server">Διακομιστής ανακοίνωσης</string>
<string name="restart">Επανεκκίνηση</string>
<string name="dialog_confirm_restart">Επιθυμείτε να επανεκκινήσετε το Syncthing;</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">ID φακέλου</string>
<!--Setting title-->
@ -93,7 +93,7 @@
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">Το μονοπάτι του φακέλου δεν μπορεί να είναι κενό</string>
<string name="dialog_discard_changes">Να απορριφθούν οι αλλαγές που κάνατε;</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">ID συσκευής</string>
<!--Setting title-->

View file

@ -26,7 +26,7 @@
<!--Title for current CPU usage-->
<!--Title for current RAM usage-->
<!--Title for announce server status-->
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<!--Setting title-->
<!--Setting title-->
@ -40,7 +40,7 @@
<!--Dialog shown when attempting to remove a folder-->
<!--Toast shown when trying to create a folder with an empty ID-->
<!--Toast shown when trying to create a folder with an empty path-->
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<!--Setting title-->
<!--Setting title-->

View file

@ -60,7 +60,7 @@
<!--Title for announce server status-->
<string name="announce_server">Anunciar Servidor</string>
<string name="restart">Reiniciar</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">ID de la carpeta</string>
<!--Setting title-->
@ -86,7 +86,7 @@
<string name="folder_id_required">El ID de la carpeta no debe estar vacío</string>
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">La ruta de la carpeta no debe estar vacía</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">ID del dispositivo</string>
<!--Setting title-->

View file

@ -62,7 +62,7 @@
<string name="announce_server">Servidor de anuncio</string>
<string name="restart">Reiniciar</string>
<string name="dialog_confirm_restart">¿Quieres reiniciar Syncthing?</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">ID de carpeta</string>
<!--Setting title-->
@ -90,7 +90,7 @@
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">La ruta a la carpeta no debe estar vacía</string>
<string name="dialog_discard_changes">¿Descartar tus cambios?</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">ID del dispositivo</string>
<!--Setting title-->

View file

@ -62,7 +62,7 @@
<string name="announce_server">Serveur d\'annonce</string>
<string name="restart">Redémarrer</string>
<string name="dialog_confirm_restart">Voulez-vous redémarrer Syncthing ?</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">ID du partage</string>
<!--Setting title-->
@ -90,7 +90,7 @@
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">Le chemin du répertoire ne doit pas être vide</string>
<string name="dialog_discard_changes">Annuler vos modifications ?</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">Mon ID</string>
<!--Setting title-->

View file

@ -53,7 +53,7 @@
<!--Title for current RAM usage-->
<string name="ram_usage">Memória használat</string>
<!--Title for announce server status-->
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">Mappa azonosító</string>
<!--Setting title-->
@ -78,7 +78,7 @@
<string name="folder_id_required">A mappaazonosító nem lehet üres</string>
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">A mappaútvonal nem lehet üres</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">Eszköz azonosító</string>
<!--Setting title-->

View file

@ -50,7 +50,7 @@
<string name="ram_usage">Penggunaan RAM</string>
<!--Title for announce server status-->
<string name="announce_server">Server Penyiaran</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">ID Folder</string>
<!--Setting title-->
@ -68,7 +68,7 @@
<!--Dialog shown when attempting to remove a folder-->
<!--Toast shown when trying to create a folder with an empty ID-->
<!--Toast shown when trying to create a folder with an empty path-->
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<!--Setting title-->
<!--Setting title-->

View file

@ -62,7 +62,7 @@
<string name="announce_server">Server Presenza Globale</string>
<string name="restart">Riavvia</string>
<string name="dialog_confirm_restart">Vuoi riavviare Syncthing?</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">ID Cartella</string>
<!--Setting title-->
@ -90,7 +90,7 @@
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">Il percorso della cartella non può essere vuoto</string>
<string name="dialog_discard_changes">Annullare le modifiche?</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">ID Dispositivo</string>
<!--Setting title-->

View file

@ -62,7 +62,7 @@
<string name="announce_server">アナウンスサーバー</string>
<string name="restart">再起動</string>
<string name="dialog_confirm_restart">Syncthing を再起動しますか?</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">フォルダー ID</string>
<!--Setting title-->
@ -90,7 +90,7 @@
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">フォルダーのパスは空にできません</string>
<string name="dialog_discard_changes">変更を破棄しますか?</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">デバイス ID</string>
<!--Setting title-->

View file

@ -62,7 +62,7 @@
<string name="announce_server">익명 서버</string>
<string name="restart">재시작</string>
<string name="dialog_confirm_restart">정말로 Syncthing을 재시작하시겠습니까?</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">폴더 ID</string>
<!--Setting title-->
@ -90,7 +90,7 @@
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">폴더 경로를 공백으로 둘 수 없습니다</string>
<string name="dialog_discard_changes">설정 변경을 취소합니까?</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">기기 ID</string>
<!--Setting title-->

View file

@ -61,7 +61,7 @@
<string name="announce_server">Søketjener</string>
<string name="restart">Omstart</string>
<string name="dialog_confirm_restart">Vil du starte Syncthing på nytt?</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">Mappe-ID</string>
<!--Setting title-->
@ -88,7 +88,7 @@
<string name="folder_id_required">Mappe-ID kan ikke være tom</string>
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">Mappestien kan ikke være tom</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">Enhets-ID</string>
<!--Setting title-->

View file

@ -62,7 +62,7 @@
<string name="announce_server">Mededelingsserver</string>
<string name="restart">Herstarten</string>
<string name="dialog_confirm_restart">Wil je Syncthing herstarten?</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">Map-ID</string>
<!--Setting title-->
@ -90,7 +90,7 @@
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">Het mappad mag niet leeg zijn</string>
<string name="dialog_discard_changes">Wijzigingen verwerpen?</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">Apparaat-ID</string>
<!--Setting title-->

View file

@ -61,7 +61,7 @@
<string name="announce_server">Søketener</string>
<string name="restart">Omstart</string>
<string name="dialog_confirm_restart">Vil du starte om att Syncthing?</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">Mappe-ID</string>
<!--Setting title-->
@ -88,7 +88,7 @@
<string name="folder_id_required">Mappe-ID kan ikkje vere tom</string>
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">Mappestien kan ikkje vere tom</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">Einings-ID</string>
<!--Setting title-->

View file

@ -62,7 +62,7 @@
<string name="announce_server">Serwer ogłoszeniowy</string>
<string name="restart">Uruchom ponownie</string>
<string name="dialog_confirm_restart">Uruchomić program ponownie?</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">Identyfikator katalogu</string>
<!--Setting title-->
@ -90,7 +90,7 @@
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">Ścieżka katalogu nie może być pusta</string>
<string name="dialog_discard_changes">Porzucić zmiany?</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">Identyfikator urządzenia</string>
<!--Setting title-->

View file

@ -62,7 +62,7 @@
<string name="announce_server">Servidor de busca global</string>
<string name="restart">Reiniciar</string>
<string name="dialog_confirm_restart">Quer mesmo reiniciar o Syncthing?</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">ID da pasta</string>
<!--Setting title-->
@ -90,7 +90,7 @@
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">O caminho da pasta não pode ficar vazio</string>
<string name="dialog_discard_changes">Descartas as alterações?</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">ID do dispositivo</string>
<!--Setting title-->

View file

@ -57,7 +57,7 @@
<string name="ram_usage">Utilização da RAM</string>
<!--Title for announce server status-->
<string name="announce_server">Servidor de busca global</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">ID da pasta</string>
<!--Setting title-->
@ -82,7 +82,7 @@
<string name="folder_id_required">O ID da pasta não pode estar vazio</string>
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">O caminho da pasta não pode estar vazio</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">ID do dispositivo</string>
<!--Setting title-->

View file

@ -26,7 +26,7 @@
<!--Title for current CPU usage-->
<!--Title for current RAM usage-->
<!--Title for announce server status-->
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<!--Setting title-->
<!--Setting title-->
@ -40,7 +40,7 @@
<!--Dialog shown when attempting to remove a folder-->
<!--Toast shown when trying to create a folder with an empty ID-->
<!--Toast shown when trying to create a folder with an empty path-->
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<!--Setting title-->
<!--Setting title-->

View file

@ -60,7 +60,7 @@
<!--Title for announce server status-->
<string name="announce_server">Сервера анонсов</string>
<string name="restart">Перезагрузить</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">ID папки</string>
<!--Setting title-->
@ -87,7 +87,7 @@
<string name="folder_id_required">ID папки не может быть пустым</string>
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">Путь к папке не может быть пустым</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">ID устройства</string>
<!--Setting title-->

View file

@ -57,7 +57,7 @@
<string name="ram_usage">Využitie RAM</string>
<!--Title for announce server status-->
<string name="announce_server">Ohlasovací server</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">ID adresára</string>
<!--Setting title-->
@ -81,7 +81,7 @@
<!--Toast shown when trying to create a folder with an empty ID-->
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">Cesta k adresáru nemôže byť prázdna</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">ID Zariadenia</string>
<!--Setting title-->

View file

@ -26,7 +26,7 @@
<!--Title for current CPU usage-->
<!--Title for current RAM usage-->
<!--Title for announce server status-->
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<!--Setting title-->
<!--Setting title-->
@ -40,7 +40,7 @@
<!--Dialog shown when attempting to remove a folder-->
<!--Toast shown when trying to create a folder with an empty ID-->
<!--Toast shown when trying to create a folder with an empty path-->
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<!--Setting title-->
<!--Setting title-->

View file

@ -26,7 +26,7 @@
<!--Title for current CPU usage-->
<!--Title for current RAM usage-->
<!--Title for announce server status-->
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<!--Setting title-->
<!--Setting title-->
@ -40,7 +40,7 @@
<!--Dialog shown when attempting to remove a folder-->
<!--Toast shown when trying to create a folder with an empty ID-->
<!--Toast shown when trying to create a folder with an empty path-->
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<!--Setting title-->
<!--Setting title-->

View file

@ -62,7 +62,7 @@
<string name="announce_server">Annonseringsserver</string>
<string name="restart">Omstart</string>
<string name="dialog_confirm_restart">Vill du starta om Syncthing?</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">Katalog-ID</string>
<!--Setting title-->
@ -90,7 +90,7 @@
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">Katalogsökvägen får inte vara tom</string>
<string name="dialog_discard_changes">Kassera dina ändringar?</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">Enhets ID</string>
<!--Setting title-->

View file

@ -57,7 +57,7 @@
<string name="ram_usage">RAM Kullanımı</string>
<!--Title for announce server status-->
<string name="announce_server">Bildirim Sunucusu</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">Klasör ID</string>
<!--Setting title-->
@ -82,7 +82,7 @@
<string name="folder_id_required">Klasör ID\'si boş bırakılamaz</string>
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">Klasör yolu boş olmamalı</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">Cihaz ID</string>
<!--Setting title-->

View file

@ -60,7 +60,7 @@
<!--Title for announce server status-->
<string name="announce_server">Máy chủ th.báo</string>
<string name="restart">Kh.chạy lại</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">ID thư mục</string>
<!--Setting title-->
@ -86,7 +86,7 @@
<string name="folder_id_required">Không được để trống ID thư mục</string>
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">Không được để trống đường dẫn thư mục</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">ID thiết bị</string>
<!--Setting title-->

View file

@ -62,7 +62,7 @@
<string name="announce_server">宣告服务器</string>
<string name="restart">重启</string>
<string name="dialog_confirm_restart">您想要重启 Syncthing 吗?</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">文件夹标识</string>
<!--Setting title-->
@ -90,7 +90,7 @@
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">文件夹路径不得为空</string>
<string name="dialog_discard_changes">放弃所做的更改?</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">设备标识</string>
<!--Setting title-->

View file

@ -46,7 +46,7 @@
<string name="ram_usage">記憶體使用率</string>
<!--Title for announce server status-->
<string name="announce_server">發布伺服器</string>
<!--FolderFragment-->
<!--FolderActivity-->
<!--Setting title-->
<string name="folder_id">資料夾識別碼</string>
<!--Setting title-->
@ -71,7 +71,7 @@
<string name="folder_id_required">資料夾識別碼不得為空</string>
<!--Toast shown when trying to create a folder with an empty path-->
<string name="folder_path_required">資料夾路徑不得為空</string>
<!--DeviceFragment-->
<!--DeviceActivity-->
<!--Setting title-->
<string name="device_id">裝置識別碼</string>
<!--Setting title-->

View file

@ -119,7 +119,7 @@ Please report any problems you encounter via Github.</string>
<string name="dialog_confirm_restart">Do you want to restart Syncthing?</string>
<!-- FolderFragment -->
<!-- FolderActivity -->
<!-- Setting title -->
@ -163,7 +163,7 @@ Please report any problems you encounter via Github.</string>
<string name="dialog_discard_changes">Discard your changes?</string>
<!-- DeviceFragment -->
<!-- DeviceActivity -->
<!-- Setting title -->