mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-12-22 19:01:30 +00:00
parent
2af5ea9780
commit
e46ec1cfee
36 changed files with 241 additions and 194 deletions
|
@ -6,7 +6,7 @@ plugins {
|
|||
|
||||
dependencies {
|
||||
implementation 'eu.chainfire:libsuperuser:1.1.0.202004101746'
|
||||
implementation 'com.google.android.material:material:1.4.0'
|
||||
implementation 'com.google.android.material:material:1.8.0'
|
||||
implementation 'com.google.code.gson:gson:2.10.1'
|
||||
implementation 'org.mindrot:jbcrypt:0.4'
|
||||
implementation 'com.google.guava:guava:31.1-android'
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.nutomic.syncthingandroid;
|
|||
import android.app.Application;
|
||||
import android.os.StrictMode;
|
||||
|
||||
import com.google.android.material.color.DynamicColors;
|
||||
import com.nutomic.syncthingandroid.util.Languages;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
@ -13,6 +14,8 @@ public class SyncthingApp extends Application {
|
|||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
DynamicColors.applyToActivitiesIfAvailable(this);
|
||||
|
||||
super.onCreate();
|
||||
|
||||
DaggerDaggerComponent.builder()
|
||||
|
|
|
@ -8,8 +8,6 @@ import android.content.Intent;
|
|||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
|
@ -22,9 +20,8 @@ import android.widget.EditText;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.android.material.materialswitch.MaterialSwitch;
|
||||
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.model.Connections;
|
||||
import com.nutomic.syncthingandroid.model.Device;
|
||||
|
@ -82,9 +79,9 @@ public class DeviceActivity extends SyncthingActivity implements View.OnClickLis
|
|||
|
||||
private TextView mCompressionValueView;
|
||||
|
||||
private SwitchCompat mIntroducerView;
|
||||
private MaterialSwitch mIntroducerView;
|
||||
|
||||
private SwitchCompat mDevicePaused;
|
||||
private MaterialSwitch mDevicePaused;
|
||||
|
||||
private TextView mSyncthingVersionView;
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ import android.widget.LinearLayout;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.android.material.color.MaterialColors;
|
||||
import com.nutomic.syncthingandroid.R;
|
||||
import com.nutomic.syncthingandroid.SyncthingApp;
|
||||
import com.nutomic.syncthingandroid.service.Constants;
|
||||
|
@ -257,12 +258,12 @@ public class FirstStartActivity extends Activity {
|
|||
}
|
||||
|
||||
private void setActiveBottomDot(int currentPage) {
|
||||
int[] colorsActive = getResources().getIntArray(R.array.array_dot_active);
|
||||
int[] colorsInactive = getResources().getIntArray(R.array.array_dot_inactive);
|
||||
for (int i = 0; i < mDots.length; i++) {
|
||||
mDots[i].setTextColor(colorsInactive[currentPage]);
|
||||
int colorInactive = MaterialColors.getColor(this, R.attr.colorPrimary, Color.BLUE);
|
||||
int colorActive = MaterialColors.getColor(this, R.attr.colorSecondary, Color.BLUE);
|
||||
for (TextView mDot : mDots) {
|
||||
mDot.setTextColor(colorInactive);
|
||||
}
|
||||
mDots[currentPage].setTextColor(colorsActive[currentPage]);
|
||||
mDots[currentPage].setTextColor(colorActive);
|
||||
}
|
||||
|
||||
// ViewPager change listener
|
||||
|
|
|
@ -9,8 +9,6 @@ import android.net.Uri;
|
|||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import androidx.documentfile.provider.DocumentFile;
|
||||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
|
@ -26,6 +24,7 @@ import android.widget.LinearLayout;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.android.material.materialswitch.MaterialSwitch;
|
||||
import com.google.gson.Gson;
|
||||
import com.nutomic.syncthingandroid.R;
|
||||
import com.nutomic.syncthingandroid.model.Device;
|
||||
|
@ -93,8 +92,8 @@ public class FolderActivity extends SyncthingActivity
|
|||
private TextView mAccessExplanationView;
|
||||
private TextView mFolderTypeView;
|
||||
private TextView mFolderTypeDescriptionView;
|
||||
private SwitchCompat mFolderFileWatcher;
|
||||
private SwitchCompat mFolderPaused;
|
||||
private MaterialSwitch mFolderFileWatcher;
|
||||
private MaterialSwitch mFolderPaused;
|
||||
private ViewGroup mDevicesContainer;
|
||||
private TextView mPullOrderTypeView;
|
||||
private TextView mPullOrderDescriptionView;
|
||||
|
@ -644,7 +643,7 @@ public class FolderActivity extends SyncthingActivity
|
|||
|
||||
private void addDeviceViewAndSetListener(Device device, LayoutInflater inflater) {
|
||||
inflater.inflate(R.layout.item_device_form, mDevicesContainer);
|
||||
SwitchCompat deviceView = (SwitchCompat) mDevicesContainer.getChildAt(mDevicesContainer.getChildCount()-1);
|
||||
MaterialSwitch deviceView = (MaterialSwitch) mDevicesContainer.getChildAt(mDevicesContainer.getChildCount()-1);
|
||||
deviceView.setOnCheckedChangeListener(null);
|
||||
deviceView.setChecked(mFolder.getDevice(device.deviceID) != null);
|
||||
deviceView.setText(device.getDisplayName());
|
||||
|
|
|
@ -2,6 +2,8 @@ package com.nutomic.syncthingandroid.activities;
|
|||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.ActivityNotFoundException;
|
||||
|
@ -18,8 +20,11 @@ import android.net.Uri;
|
|||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.os.PersistableBundle;
|
||||
import android.os.PowerManager;
|
||||
import android.provider.Settings;
|
||||
|
||||
import com.google.android.material.color.DynamicColors;
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
|
|
@ -60,8 +60,9 @@ public class QRScannerActivity extends ThemedAppCompatActivity implements Barcod
|
|||
// region === Permissions Callback ===
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
if (requestCode == RC_HANDLE_CAMERA_PERM) {
|
||||
if (grantResults.length !=0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
if (grantResults.length != 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
startScanner();
|
||||
} else {
|
||||
finish();
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.nutomic.syncthingandroid.activities;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
|
@ -56,17 +55,21 @@ public class SettingsActivity extends SyncthingActivity {
|
|||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_preferences);
|
||||
setTitle(R.string.settings_title);
|
||||
|
||||
SettingsFragment settingsFragment = new SettingsFragment();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(EXTRA_OPEN_SUB_PREF_SCREEN, getIntent().getStringExtra(EXTRA_OPEN_SUB_PREF_SCREEN));
|
||||
settingsFragment.setArguments(bundle);
|
||||
getFragmentManager().beginTransaction()
|
||||
.replace(android.R.id.content, settingsFragment)
|
||||
.replace(R.id.settings_container, settingsFragment)
|
||||
.commit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
if (requestCode == Constants.PermissionRequestType.LOCATION.ordinal()) {
|
||||
boolean granted = grantResults.length > 0;
|
||||
for (int i = 0; i < grantResults.length; i++) {
|
||||
|
@ -80,9 +83,9 @@ public class SettingsActivity extends SyncthingActivity {
|
|||
.setAction(SyncthingService.ACTION_REFRESH_NETWORK_INFO));
|
||||
} else {
|
||||
Util.getAlertDialogBuilder(this)
|
||||
.setTitle(R.string.sync_only_wifi_ssids_location_permission_rejected_dialog_title)
|
||||
.setMessage(R.string.sync_only_wifi_ssids_location_permission_rejected_dialog_content)
|
||||
.setPositiveButton(android.R.string.ok, null).show();
|
||||
.setTitle(R.string.sync_only_wifi_ssids_location_permission_rejected_dialog_title)
|
||||
.setMessage(R.string.sync_only_wifi_ssids_location_permission_rejected_dialog_content)
|
||||
.setPositiveButton(android.R.string.ok, null).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import androidx.appcompat.app.AlertDialog;
|
|||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.nutomic.syncthingandroid.R;
|
||||
import com.nutomic.syncthingandroid.service.Constants;
|
||||
|
||||
|
@ -238,6 +239,6 @@ public class Util {
|
|||
*/
|
||||
public static AlertDialog.Builder getAlertDialogBuilder(Context context)
|
||||
{
|
||||
return new AlertDialog.Builder(context, R.style.Theme_Syncthing_Dialog);
|
||||
return new MaterialAlertDialogBuilder(context);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,12 +4,15 @@ import android.content.Context;
|
|||
import android.content.res.Resources;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.google.android.material.color.MaterialColors;
|
||||
import com.nutomic.syncthingandroid.R;
|
||||
import com.nutomic.syncthingandroid.model.Connections;
|
||||
import com.nutomic.syncthingandroid.model.Device;
|
||||
|
@ -63,7 +66,7 @@ public class DevicesAdapter extends ArrayAdapter<Device> {
|
|||
download.setText(Util.readableTransferRate(getContext(), 0));
|
||||
upload.setText(Util.readableTransferRate(getContext(), 0));
|
||||
status.setText(r.getString(R.string.device_paused));
|
||||
status.setTextColor(ContextCompat.getColor(getContext(), R.color.text_black));
|
||||
status.setTextColor(MaterialColors.getColor(getContext(), android.R.attr.textColorPrimary, Color.BLACK));
|
||||
return convertView;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@ package com.nutomic.syncthingandroid.views;
|
|||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.net.Uri;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
@ -15,6 +17,7 @@ import android.widget.ArrayAdapter;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.android.material.color.MaterialColors;
|
||||
import com.nutomic.syncthingandroid.R;
|
||||
import com.nutomic.syncthingandroid.databinding.ItemFolderListBinding;
|
||||
import com.nutomic.syncthingandroid.model.Folder;
|
||||
|
@ -107,7 +110,7 @@ public class FoldersAdapter extends ArrayAdapter<Folder> {
|
|||
} else {
|
||||
if (folder.paused) {
|
||||
binding.state.setText(mContext.getString(R.string.state_paused));
|
||||
binding.state.setTextColor(ContextCompat.getColor(mContext, R.color.text_black));
|
||||
binding.state.setTextColor(MaterialColors.getColor(mContext, android.R.attr.textColorPrimary, Color.BLACK));
|
||||
} else {
|
||||
binding.state.setText(getLocalizedState(mContext, folderStatus));
|
||||
switch(folderStatus.state) {
|
||||
|
|
22
app/src/main/res/drawable/dialog_bg_monet.xml
Normal file
22
app/src/main/res/drawable/dialog_bg_monet.xml
Normal file
|
@ -0,0 +1,22 @@
|
|||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape>
|
||||
<solid android:color="?attr/colorSurface" />
|
||||
<corners
|
||||
android:bottomLeftRadius="28dp"
|
||||
android:bottomRightRadius="28dp"
|
||||
android:topLeftRadius="28dp"
|
||||
android:topRightRadius="28dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape>
|
||||
<solid android:color="@color/m3_popupmenu_overlay_color" />
|
||||
<corners
|
||||
android:bottomLeftRadius="28dp"
|
||||
android:bottomRightRadius="28dp"
|
||||
android:topLeftRadius="28dp"
|
||||
android:topRightRadius="28dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
20
app/src/main/res/drawable/ic_monochrome.xml
Normal file
20
app/src/main/res/drawable/ic_monochrome.xml
Normal file
|
@ -0,0 +1,20 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="192"
|
||||
android:viewportHeight="192">
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="m140.62,99.65a45.18,45.18 0,0 1,-3.05 13.06m-33.76,27.72a45.18,45.18 0,0 1,-8.22 0.75,45.18 45.18,0 0,1 -30.83,-12.15M51.22,87.47A45.18,45.18 0,0 1,95.59 50.82,45.18 45.18,0 0,1 122.64,59.82"
|
||||
android:strokeWidth="8.21444"
|
||||
android:strokeColor="#000000"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round" />
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="m130.42,130.92a6.16,6.16 0,0 1,-6.16 6.16,6.16 6.16,0 0,1 -6.16,-6.16 6.16,6.16 0,0 1,6.16 -6.16,6.16 6.16,0 0,1 6.16,6.16zM142.91,77.39a6.16,6.16 0,0 1,-6.16 6.16,6.16 6.16,0 0,1 -6.16,-6.16 6.16,6.16 0,0 1,6.16 -6.16,6.16 6.16,0 0,1 6.16,6.16zM110.99,102.16a6.16,6.16 0,0 1,-6.16 6.16,6.16 6.16,0 0,1 -6.16,-6.16 6.16,6.16 0,0 1,6.16 -6.16,6.16 6.16,0 0,1 6.16,6.16zM58.8,110.01a6.16,6.16 0,0 1,-6.16 6.16,6.16 6.16,0 0,1 -6.16,-6.16 6.16,6.16 0,0 1,6.16 -6.16,6.16 6.16,0 0,1 6.16,6.16zM136.75,63.01a14.38,14.38 0,0 0,-14.38 14.38,14.38 14.38,0 0,0 1,5.18L113.19,90.47A14.38,14.38 0,0 0,104.83 87.79,14.38 14.38,0 0,0 90.6,100.15l-24.95,3.75a14.38,14.38 0,0 0,-13.01 -8.27,14.38 14.38,0 0,0 -14.38,14.38 14.38,14.38 0,0 0,14.38 14.38,14.38 14.38,0 0,0 14.23,-12.36l24.96,-3.75a14.38,14.38 0,0 0,13 8.27,14.38 14.38,0 0,0 4.3,-0.68l4.03,5.96a14.38,14.38 0,0 0,-3.27 9.1,14.38 14.38,0 0,0 14.38,14.38 14.38,14.38 0,0 0,14.38 -14.38,14.38 14.38,0 0,0 -14.38,-14.38 14.38,14.38 0,0 0,-4.3 0.67l-4.03,-5.96a14.38,14.38 0,0 0,3.27 -9.09,14.38 14.38,0 0,0 -0.98,-5.2l10.19,-7.91a14.38,14.38 0,0 0,8.34 2.71,14.38 14.38,0 0,0 14.38,-14.38 14.38,14.38 0,0 0,-14.38 -14.38z"
|
||||
android:strokeWidth="0.684536"
|
||||
tools:ignore="VectorPath" />
|
||||
</vector>
|
|
@ -1,56 +1,51 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="com.nutomic.syncthingandroid.activities.FirstStartActivity"
|
||||
tools:showIn="@layout/activity_first_start">
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="com.nutomic.syncthingandroid.activities.FirstStartActivity"
|
||||
tools:showIn="@layout/activity_first_start">
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutDots"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dots_height"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="@dimen/dots_margin_bottom"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutDots"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dots_height"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="@dimen/dots_margin_bottom"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_above="@id/layoutDots"
|
||||
android:alpha=".5"
|
||||
android:background="@android:color/white" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:alpha=".5"
|
||||
android:layout_above="@id/layoutDots"
|
||||
android:background="@android:color/white" />
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_back"
|
||||
style="@style/Widget.Material3.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="10dp"
|
||||
android:text="@string/back"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:background="@null"
|
||||
android:text="@string/back"
|
||||
android:textColor="@android:color/white"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:background="@null"
|
||||
android:text="@string/cont"
|
||||
android:textColor="@android:color/white" />
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_next"
|
||||
style="@style/Widget.Material3.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/cont" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_screen4"
|
||||
android:fillViewport="true"
|
||||
android:paddingBottom="@dimen/dots_full_height">
|
||||
|
||||
|
@ -19,7 +18,6 @@
|
|||
android:layout_margin="30dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/api_level_30_title"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="30sp" />
|
||||
|
||||
<TextView
|
||||
|
@ -32,10 +30,10 @@
|
|||
android:paddingBottom="@dimen/desc_padding"
|
||||
android:text="@string/api_level_30_desc"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/slide_desc" />
|
||||
|
||||
<Button
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Widget.Material3.Button.ElevatedButton"
|
||||
android:id="@+id/btnResetDatabase"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_screen1"
|
||||
android:fillViewport="true"
|
||||
android:paddingBottom="@dimen/dots_full_height">
|
||||
|
||||
|
@ -19,20 +19,20 @@
|
|||
android:layout_margin="30dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/welcome_title"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="30sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/img_width_height"
|
||||
android:layout_height="@dimen/img_width_height"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_syncthing_logo" />
|
||||
android:src="@drawable/ic_monochrome"
|
||||
android:tint="?attr/colorPrimary"
|
||||
tools:ignore="UseAppTint" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/introduction"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/slide_title"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
@ -46,7 +46,6 @@
|
|||
android:paddingBottom="@dimen/desc_paddingBottom"
|
||||
android:text="@string/welcome_text"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/slide_desc" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_screen3"
|
||||
android:fillViewport="true"
|
||||
android:paddingBottom="@dimen/dots_full_height">
|
||||
|
||||
|
@ -19,7 +18,6 @@
|
|||
android:layout_margin="30dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/welcome_title"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="30sp" />
|
||||
|
||||
<ImageView
|
||||
|
@ -28,14 +26,14 @@
|
|||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_location" />
|
||||
|
||||
<Button
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Widget.Material3.Button.ElevatedButton"
|
||||
android:id="@+id/btnGrantLocationPerm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:contentDescription="@string/grant_permission"
|
||||
android:drawableStart="@android:drawable/ic_menu_mylocation"
|
||||
android:drawableLeft="@android:drawable/ic_menu_mylocation"
|
||||
android:paddingStart="40dp"
|
||||
android:paddingLeft="40dp"
|
||||
android:paddingEnd="40dp"
|
||||
|
@ -49,7 +47,6 @@
|
|||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/location_permission_title"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/slide_title"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
@ -63,7 +60,6 @@
|
|||
android:paddingBottom="@dimen/desc_paddingBottom"
|
||||
android:text="@string/location_permission_desc"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/slide_desc" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_screen2"
|
||||
android:fillViewport="true"
|
||||
android:paddingBottom="@dimen/dots_full_height">
|
||||
|
||||
|
@ -19,23 +19,24 @@
|
|||
android:layout_margin="30dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/welcome_title"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="30sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/img_width_height"
|
||||
android:layout_height="@dimen/img_width_height"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_storage" />
|
||||
android:src="@drawable/ic_storage"
|
||||
android:tint="?attr/colorSecondary"
|
||||
tools:ignore="UseAppTint" />
|
||||
|
||||
<Button
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnGrantStoragePerm"
|
||||
style="@style/Widget.Material3.Button.ElevatedButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:contentDescription="@string/grant_permission"
|
||||
android:drawableStart="@android:drawable/ic_menu_save"
|
||||
android:drawableLeft="@android:drawable/ic_menu_save"
|
||||
android:paddingStart="40dp"
|
||||
android:paddingLeft="40dp"
|
||||
android:paddingEnd="40dp"
|
||||
|
@ -47,7 +48,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/storage_permission_title"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/slide_title"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
@ -61,7 +61,6 @@
|
|||
android:paddingBottom="@dimen/desc_paddingBottom"
|
||||
android:text="@string/storage_permission_desc"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/slide_desc" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
@ -17,7 +18,10 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:background="?colorPrimary"
|
||||
android:elevation="@dimen/toolbar_elevation"
|
||||
android:theme="@style/ThemeOverlay.Syncthing.Toolbar" />
|
||||
android:theme="@style/ThemeOverlay.Syncthing.Toolbar"
|
||||
app:tabIndicatorColor="@android:color/white"
|
||||
app:tabSelectedTextColor="@android:color/white"
|
||||
app:tabTextColor="@android:color/white" />
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/pager"
|
||||
|
|
15
app/src/main/res/layout/activity_preferences.xml
Normal file
15
app/src/main/res/layout/activity_preferences.xml
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?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/settings_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical" />
|
||||
|
||||
</LinearLayout>
|
|
@ -90,7 +90,6 @@
|
|||
android:background="?android:selectableItemBackground"
|
||||
android:minWidth="60dip"
|
||||
android:text="@string/save_title"
|
||||
android:textColor="@color/accent"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
|
@ -110,7 +109,6 @@
|
|||
android:background="?android:selectableItemBackground"
|
||||
android:minWidth="50dip"
|
||||
android:text="@string/cancel_title"
|
||||
android:textColor="@color/accent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.951"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
|
|
|
@ -49,8 +49,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/open_log"
|
||||
style="@style/Widget.AppCompat.Button.Borderless.Colored"
|
||||
android:textColor="@color/accent"/>
|
||||
style="@style/Widget.AppCompat.Button.Borderless.Colored" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/light_grey"
|
||||
android:padding="5dip"
|
||||
android:id="@+id/example"/>
|
||||
</ScrollView>
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/introducer"
|
||||
style="@style/Widget.Syncthing.TextView.Label.Details"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -112,7 +112,7 @@
|
|||
android:drawableStart="@drawable/ic_phonelink_24dp"
|
||||
android:text="@string/introducer" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/devicePause"
|
||||
style="@style/Widget.Syncthing.TextView.Label.Details"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -93,30 +93,27 @@
|
|||
android:id="@+id/folderType"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="75dp"
|
||||
android:layout_marginStart="75dp"
|
||||
android:layout_marginTop="-20dp"
|
||||
android:layout_marginStart="72dp"
|
||||
android:layout_marginTop="-10dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/folderTypeDescription"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="75dp"
|
||||
android:layout_marginStart="75dp"
|
||||
android:layout_marginStart="72dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/accessExplanationView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="75dp"
|
||||
android:layout_marginStart="75dp"
|
||||
android:layout_marginStart="72dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/fileWatcher"
|
||||
style="@style/Widget.Syncthing.TextView.Label.Details"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -130,14 +127,15 @@
|
|||
android:id="@+id/fileWatcherDescription"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="75dp"
|
||||
android:layout_marginStart="75dp"
|
||||
android:layout_marginTop="-20dp"
|
||||
android:layout_marginTop="-10dp"
|
||||
android:layout_marginEnd="60dp"
|
||||
android:layout_marginStart="72dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
|
||||
android:text="@string/folder_fileWatcherDescription"
|
||||
android:focusable="false"/>
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/folderPause"
|
||||
style="@style/Widget.Syncthing.TextView.Label.Details"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -170,18 +168,17 @@
|
|||
android:id="@+id/pullOrderType"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="75dp"
|
||||
android:layout_marginStart="75dp"
|
||||
android:layout_marginTop="-20dp"
|
||||
android:layout_marginStart="72dp"
|
||||
android:layout_marginTop="-15dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pullOrderDescription"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="75dp"
|
||||
android:layout_marginStart="75dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
|
||||
android:layout_marginStart="72dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
|
||||
android:layout_marginBottom="10dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -208,8 +205,7 @@
|
|||
android:id="@+id/versioningType"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="75dp"
|
||||
android:layout_marginStart="75dp"
|
||||
android:layout_marginStart="72dp"
|
||||
android:layout_marginTop="-20dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
|
||||
|
||||
|
@ -217,9 +213,9 @@
|
|||
android:id="@+id/versioningDescription"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="75dp"
|
||||
android:layout_marginStart="75dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
|
||||
android:layout_marginStart="72dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
|
||||
android:layout_marginBottom="10dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/edit_ignores"
|
||||
|
|
|
@ -24,12 +24,11 @@
|
|||
|
||||
<Button
|
||||
android:id="@+id/finish_btn"
|
||||
style="@style/Widget.AppCompat.Button.ButtonBar.AlertDialog"
|
||||
style="@style/Widget.Material3.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="end"
|
||||
android:text="@string/finish"
|
||||
android:textColor="@color/primary_dark" />
|
||||
android:text="@string/finish" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
|
|
@ -24,12 +24,11 @@
|
|||
|
||||
<Button
|
||||
android:id="@+id/finish_btn"
|
||||
style="@style/Widget.AppCompat.Button.ButtonBar.AlertDialog"
|
||||
style="@style/Widget.Material3.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="end"
|
||||
android:text="@string/finish"
|
||||
android:textColor="@color/primary_dark" />
|
||||
android:text="@string/finish" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
|
|
@ -29,12 +29,11 @@
|
|||
|
||||
<Button
|
||||
android:id="@+id/finish_btn"
|
||||
style="@style/Widget.AppCompat.Button.ButtonBar.AlertDialog"
|
||||
style="@style/Widget.Material3.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="end"
|
||||
android:text="@string/finish"
|
||||
android:textColor="@color/primary_dark" />
|
||||
android:text="@string/finish" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.appcompat.widget.SwitchCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.materialswitch.MaterialSwitch xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
style="@style/Widget.Syncthing.TextView.Label.Details.DeviceList"
|
||||
android:id="@+id/device_toggle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -78,8 +78,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/size"
|
||||
android:textAppearance="?textAppearanceListItemSecondary"
|
||||
android:textColor="@color/text_red" />
|
||||
android:textAppearance="?textAppearanceListItemSecondary" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
|
|
@ -2,4 +2,5 @@
|
|||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@mipmap/ic_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_foreground"/>
|
||||
<monochrome android:drawable="@drawable/ic_monochrome" />
|
||||
</adaptive-icon>
|
||||
|
|
8
app/src/main/res/values-night/themes.xml
Normal file
8
app/src/main/res/values-night/themes.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<style name="Theme.Syncthing" parent="Theme.Syncthing.Base">
|
||||
<item name="android:windowLightNavigationBar" tools:ignore="NewApi">false</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
|
@ -2,46 +2,10 @@
|
|||
<resources>
|
||||
<color name="primary">#03A9F4</color>
|
||||
<color name="primary_dark">#0288D1</color>
|
||||
<color name="accent">#FFC107</color>
|
||||
<color name="divider">#1F000000</color>
|
||||
|
||||
<color name="text_black">#000000</color>
|
||||
<color name="text_red">#ffff4444</color>
|
||||
<color name="text_blue">#ff33b5e5</color>
|
||||
<color name="text_green">#ff99cc00</color>
|
||||
<color name="light_grey">#cccccc</color>
|
||||
|
||||
<!-- FirstStartActivity welcome wizard start -->
|
||||
<!-- Screens background color-->
|
||||
<color name="bg_screen1">#3395ff</color>
|
||||
<color name="bg_screen2">#20d2bb</color>
|
||||
<color name="bg_screen3">#c873f4</color>
|
||||
<color name="bg_screen4">#f64c73</color>
|
||||
|
||||
<!-- dots inactive colors -->
|
||||
<color name="dot_dark_screen1">#2278d4</color>
|
||||
<color name="dot_dark_screen2">#14a895</color>
|
||||
<color name="dot_dark_screen3">#a854d4</color>
|
||||
<color name="dot_dark_screen4">#d1395c</color>
|
||||
|
||||
<!-- dots active colors -->
|
||||
<color name="dot_light_screen1">#93c6fd</color>
|
||||
<color name="dot_light_screen2">#8cf9eb</color>
|
||||
<color name="dot_light_screen3">#e4b5fc</color>
|
||||
<color name="dot_light_screen4">#f98da5</color>
|
||||
|
||||
<array name="array_dot_active">
|
||||
<item>@color/dot_light_screen1</item>
|
||||
<item>@color/dot_light_screen2</item>
|
||||
<item>@color/dot_light_screen3</item>
|
||||
<item>@color/dot_light_screen4</item>
|
||||
</array>
|
||||
|
||||
<array name="array_dot_inactive">
|
||||
<item>@color/dot_dark_screen1</item>
|
||||
<item>@color/dot_dark_screen2</item>
|
||||
<item>@color/dot_dark_screen3</item>
|
||||
<item>@color/dot_dark_screen4</item>
|
||||
</array>
|
||||
<!-- FirstStartActivity welcome wizard end -->
|
||||
</resources>
|
||||
|
|
|
@ -14,4 +14,5 @@
|
|||
<dimen name="desc_marginTop">20dp</dimen>
|
||||
<dimen name="desc_paddingBottom">80dp</dimen>
|
||||
<dimen name="button_height">44dp</dimen>
|
||||
<dimen name="dialog_corner_radius">28dp</dimen>
|
||||
</resources>
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Syncthing.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
<style name="Theme.Syncthing.AppBarOverlay" parent="ThemeOverlay.Material3.Dark.ActionBar" />
|
||||
|
||||
<style name="Theme.Syncthing.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||
<style name="Theme.Syncthing.PopupOverlay" parent="ThemeOverlay.Material3.Light" />
|
||||
</resources>
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<!-- Activity themes -->
|
||||
<eat-comment/>
|
||||
|
||||
<style name="Theme.Syncthing.Base" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
<style name="Theme.Syncthing.Base" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<item name="colorPrimary">@color/primary</item>
|
||||
<item name="colorPrimaryDark">@color/primary_dark</item>
|
||||
<item name="colorAccent">@color/accent</item>
|
||||
|
||||
<item name="textAppearanceListItemPrimary">@style/TextAppearance.Syncthing.ListItemPrimary</item>
|
||||
<item name="textAppearanceListItemSecondary">@style/TextAppearance.Syncthing.ListItemSecondary</item>
|
||||
|
@ -22,10 +21,20 @@
|
|||
|
||||
<item name="android:spinnerStyle">@style/Widget.AppCompat.Spinner.Underlined</item>
|
||||
<item name="android:spinnerItemStyle">@style/Widget.Syncthing.TextView.SpinnerItem</item>
|
||||
<item name="android:alertDialogTheme">@style/Theme.Syncthing.Dialog</item>
|
||||
|
||||
<item name="android:alertDialogTheme">@style/ThemeOverlay.App.MaterialAlertDialog.Monet</item>
|
||||
<item name="alertDialogTheme">@style/ThemeOverlay.App.MaterialAlertDialog.Monet</item>
|
||||
<item name="android:dialogCornerRadius" tools:targetApi="p">@dimen/dialog_corner_radius</item>
|
||||
<item name="dialogCornerRadius">@dimen/dialog_corner_radius</item>
|
||||
|
||||
<item name="android:statusBarColor" tools:targetApi="m">?attr/colorPrimary</item>
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Syncthing" parent="Theme.Syncthing.Base"/>
|
||||
<style name="Theme.Syncthing" parent="Theme.Syncthing.Base">
|
||||
<item name="android:windowLightStatusBar" tools:targetApi="m">false</item>
|
||||
<item name="android:windowLightNavigationBar" tools:ignore="NewApi">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Syncthing.Translucent">
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
|
@ -37,26 +46,39 @@
|
|||
<!-- Dialog themes -->
|
||||
<eat-comment/>
|
||||
|
||||
<style name="Theme.Syncthing.Dialog" parent="Theme.AppCompat.DayNight.Dialog.Alert">
|
||||
<item name="android:textColor">?attr/colorControlNormal</item>
|
||||
<item name="android:windowBackground">?attr/colorBackgroundFloating</item>
|
||||
<item name="android:buttonBarButtonStyle">@style/Theme.Syncthing.ButtonStyle</item>
|
||||
<item name="buttonBarButtonStyle">@style/Theme.Syncthing.ButtonStyle</item>
|
||||
<item name="colorAccent">@color/primary_dark</item>
|
||||
<style name="Theme.Syncthing.Dialog" parent="Theme.Material3.DayNight.Dialog.Alert">
|
||||
<item name="alertDialogStyle">@style/MaterialAlertDialog.App</item>
|
||||
<item name="dialogCornerRadius">28dp</item>
|
||||
</style>
|
||||
|
||||
<!-- Button themes -->
|
||||
<eat-comment/>
|
||||
|
||||
<style name="Theme.Syncthing.ButtonStyle" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog">
|
||||
<item name="android:textColor">@color/primary_dark</item>
|
||||
</style>
|
||||
<style name="Theme.Syncthing.ButtonStyle" parent="Widget.Material3.Button.TextButton.Dialog" />
|
||||
|
||||
<!-- Toolbar themes -->
|
||||
<eat-comment/>
|
||||
|
||||
<style name="ThemeOverlay.Syncthing.Toolbar" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
<style name="ThemeOverlay.Syncthing.Toolbar" parent="ThemeOverlay.Material3.Dark.ActionBar">
|
||||
<item name="android:windowBackground">@null</item>
|
||||
<item name="colorAccent">@android:color/white</item>
|
||||
</style>
|
||||
|
||||
<!-- Preference dialog theme -->
|
||||
<eat-comment/>
|
||||
|
||||
<style name="ThemeOverlay.App.MaterialAlertDialog.Monet" parent="ThemeOverlay.Material3.MaterialAlertDialog">
|
||||
<item name="alertDialogStyle">@style/MaterialAlertDialog.App</item>
|
||||
<item name="dialogCornerRadius">@dimen/dialog_corner_radius</item>
|
||||
<item name="android:background">@drawable/dialog_bg_monet</item>
|
||||
</style>
|
||||
|
||||
<style name="MaterialAlertDialog.App" parent="MaterialAlertDialog.Material3">
|
||||
<item name="shapeAppearanceOverlay">@null</item>
|
||||
<item name="shapeAppearance">@style/ShapeAppearance.App.MediumComponent</item>
|
||||
</style>
|
||||
|
||||
<style name="ShapeAppearance.App.MediumComponent" parent="ShapeAppearance.Material3.MediumComponent">
|
||||
<item name="cornerFamily">rounded</item>
|
||||
<item name="cornerSize">@dimen/dialog_corner_radius</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in a new issue