mirror of
https://github.com/syncthing/syncthing-android.git
synced 2025-01-14 22:15:54 +00:00
Ditched deprecated actionbar APIs and moved to Toolbar.
Also: Corrected styling of the tab layout to match previous implementation. App now follows material convention for side drawer overlapping the app bar.
This commit is contained in:
parent
7a94eb828c
commit
d54e1aa47c
17 changed files with 116 additions and 58 deletions
|
@ -61,8 +61,6 @@ public class FolderPickerActivity extends SyncthingActivity
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
||||||
|
|
||||||
setContentView(R.layout.activity_folder_picker);
|
setContentView(R.layout.activity_folder_picker);
|
||||||
mListView = (ListView) findViewById(android.R.id.list);
|
mListView = (ListView) findViewById(android.R.id.list);
|
||||||
mListView.setOnItemClickListener(this);
|
mListView.setOnItemClickListener(this);
|
||||||
|
|
|
@ -41,7 +41,6 @@ public class LogActivity extends SyncthingActivity {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
setContentView(R.layout.activity_log);
|
setContentView(R.layout.activity_log);
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
||||||
|
|
||||||
if (savedInstanceState != null) {
|
if (savedInstanceState != null) {
|
||||||
mSyncthingLog = savedInstanceState.getBoolean("syncthingLog");
|
mSyncthingLog = savedInstanceState.getBoolean("syncthingLog");
|
||||||
|
|
|
@ -20,6 +20,7 @@ import android.support.v4.app.FragmentPagerAdapter;
|
||||||
import android.support.v4.view.GravityCompat;
|
import android.support.v4.view.GravityCompat;
|
||||||
import android.support.v4.view.ViewPager;
|
import android.support.v4.view.ViewPager;
|
||||||
import android.support.v4.widget.DrawerLayout;
|
import android.support.v4.widget.DrawerLayout;
|
||||||
|
import android.support.v7.app.ActionBar;
|
||||||
import android.support.v7.app.ActionBarDrawerToggle;
|
import android.support.v7.app.ActionBarDrawerToggle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
|
@ -110,9 +111,6 @@ public class MainActivity extends SyncthingActivity
|
||||||
mDisabledDialog = null;
|
mDisabledDialog = null;
|
||||||
}
|
}
|
||||||
mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);
|
mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);
|
||||||
mDrawerLayout.setDrawerListener(mDrawerToggle);
|
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
||||||
getSupportActionBar().setHomeButtonEnabled(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -190,8 +188,6 @@ public class MainActivity extends SyncthingActivity
|
||||||
|
|
||||||
private ViewPager mViewPager;
|
private ViewPager mViewPager;
|
||||||
|
|
||||||
private TabLayout mTabLayout;
|
|
||||||
|
|
||||||
private ActionBarDrawerToggle mDrawerToggle;
|
private ActionBarDrawerToggle mDrawerToggle;
|
||||||
|
|
||||||
private DrawerLayout mDrawerLayout;
|
private DrawerLayout mDrawerLayout;
|
||||||
|
@ -208,8 +204,8 @@ public class MainActivity extends SyncthingActivity
|
||||||
mViewPager = (ViewPager) findViewById(R.id.pager);
|
mViewPager = (ViewPager) findViewById(R.id.pager);
|
||||||
mViewPager.setAdapter(mSectionsPagerAdapter);
|
mViewPager.setAdapter(mSectionsPagerAdapter);
|
||||||
|
|
||||||
mTabLayout = (TabLayout) findViewById(R.id.tabContainer);
|
TabLayout tabLayout = (TabLayout) findViewById(R.id.tabContainer);
|
||||||
mTabLayout.setupWithViewPager(mViewPager);
|
tabLayout.setupWithViewPager(mViewPager);
|
||||||
|
|
||||||
if (savedInstanceState != null) {
|
if (savedInstanceState != null) {
|
||||||
FragmentManager fm = getSupportFragmentManager();
|
FragmentManager fm = getSupportFragmentManager();
|
||||||
|
@ -231,6 +227,7 @@ public class MainActivity extends SyncthingActivity
|
||||||
.replace(R.id.drawer, mDrawerFragment)
|
.replace(R.id.drawer, mDrawerFragment)
|
||||||
.commit();
|
.commit();
|
||||||
mDrawerToggle = new Toggle(this, mDrawerLayout);
|
mDrawerToggle = new Toggle(this, mDrawerLayout);
|
||||||
|
mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
|
||||||
mDrawerLayout.setDrawerListener(mDrawerToggle);
|
mDrawerLayout.setDrawerListener(mDrawerToggle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,7 +271,13 @@ public class MainActivity extends SyncthingActivity
|
||||||
@Override
|
@Override
|
||||||
protected void onPostCreate(Bundle savedInstanceState) {
|
protected void onPostCreate(Bundle savedInstanceState) {
|
||||||
super.onPostCreate(savedInstanceState);
|
super.onPostCreate(savedInstanceState);
|
||||||
|
|
||||||
mDrawerToggle.syncState();
|
mDrawerToggle.syncState();
|
||||||
|
|
||||||
|
ActionBar actionBar = getSupportActionBar();
|
||||||
|
if (actionBar != null) {
|
||||||
|
actionBar.setHomeButtonEnabled(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -288,7 +291,6 @@ public class MainActivity extends SyncthingActivity
|
||||||
return mDrawerToggle.onOptionsItemSelected(item) || super.onOptionsItemSelected(item);
|
return mDrawerToggle.onOptionsItemSelected(item) || super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles drawer opened and closed events, toggling option menu state.
|
* Handles drawer opened and closed events, toggling option menu state.
|
||||||
*/
|
*/
|
||||||
|
@ -301,16 +303,12 @@ public class MainActivity extends SyncthingActivity
|
||||||
public void onDrawerOpened(View drawerView) {
|
public void onDrawerOpened(View drawerView) {
|
||||||
super.onDrawerOpened(drawerView);
|
super.onDrawerOpened(drawerView);
|
||||||
mDrawerFragment.onDrawerOpened();
|
mDrawerFragment.onDrawerOpened();
|
||||||
mFolderFragment.setHasOptionsMenu(false);
|
|
||||||
mDevicesFragment.setHasOptionsMenu(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDrawerClosed(View view) {
|
public void onDrawerClosed(View view) {
|
||||||
super.onDrawerClosed(view);
|
super.onDrawerClosed(view);
|
||||||
mDrawerFragment.onDrawerClosed();
|
mDrawerFragment.onDrawerClosed();
|
||||||
mFolderFragment.setHasOptionsMenu(true);
|
|
||||||
mDevicesFragment.setHasOptionsMenu(true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package com.nutomic.syncthingandroid.activities;
|
package com.nutomic.syncthingandroid.activities;
|
||||||
|
|
||||||
import android.annotation.TargetApi;
|
import android.annotation.TargetApi;
|
||||||
import android.app.Activity;
|
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.Notification;
|
import android.app.Notification;
|
||||||
import android.app.NotificationManager;
|
import android.app.NotificationManager;
|
||||||
|
@ -9,12 +8,9 @@ import android.app.PendingIntent;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Build;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.NotificationCompat;
|
import android.support.v4.app.NotificationCompat;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
|
||||||
|
|
||||||
import com.nutomic.syncthingandroid.BuildConfig;
|
|
||||||
import com.nutomic.syncthingandroid.R;
|
import com.nutomic.syncthingandroid.R;
|
||||||
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
|
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
|
||||||
|
|
||||||
|
@ -32,8 +28,6 @@ public class RestartActivity extends SyncthingActivity {
|
||||||
@TargetApi(11)
|
@TargetApi(11)
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
// Using `<item name="windowActionBar">false</item>` in style causes crash.
|
|
||||||
getSupportActionBar().hide();
|
|
||||||
|
|
||||||
final Intent intent = new Intent(this, SyncthingService.class)
|
final Intent intent = new Intent(this, SyncthingService.class)
|
||||||
.setAction(SyncthingService.ACTION_RESTART);
|
.setAction(SyncthingService.ACTION_RESTART);
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class SettingsActivity extends SyncthingActivity {
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
setContentView(R.layout.activity_settings);
|
||||||
|
|
||||||
FragmentManager fm = getSupportFragmentManager();
|
FragmentManager fm = getSupportFragmentManager();
|
||||||
if (savedInstanceState != null) {
|
if (savedInstanceState != null) {
|
||||||
|
@ -71,7 +71,7 @@ public class SettingsActivity extends SyncthingActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
fm.beginTransaction()
|
fm.beginTransaction()
|
||||||
.replace(android.R.id.content, mFragment)
|
.replace(R.id.content, mFragment)
|
||||||
.commit();
|
.commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,6 @@ import android.content.Intent;
|
||||||
import android.content.ServiceConnection;
|
import android.content.ServiceConnection;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.support.v7.app.ActionBarActivity;
|
|
||||||
import android.support.v7.app.AppCompatActivity;
|
|
||||||
|
|
||||||
import com.nutomic.syncthingandroid.syncthing.RestApi;
|
import com.nutomic.syncthingandroid.syncthing.RestApi;
|
||||||
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
|
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
|
||||||
|
@ -18,7 +16,7 @@ import java.util.LinkedList;
|
||||||
/**
|
/**
|
||||||
* Connects to {@link SyncthingService} and provides access to it.
|
* Connects to {@link SyncthingService} and provides access to it.
|
||||||
*/
|
*/
|
||||||
public abstract class SyncthingActivity extends AppCompatActivity implements ServiceConnection {
|
public abstract class SyncthingActivity extends ToolbarBindingActivity implements ServiceConnection {
|
||||||
|
|
||||||
private SyncthingService mSyncthingService;
|
private SyncthingService mSyncthingService;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.nutomic.syncthingandroid.activities;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.v7.app.AppCompatActivity;
|
||||||
|
import android.support.v7.widget.Toolbar;
|
||||||
|
|
||||||
|
import com.nutomic.syncthingandroid.R;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An activity that onPostCreate will look for a Toolbar in the layout
|
||||||
|
* and bind it as the activity's actionbar with reasonable defaults. <br/>
|
||||||
|
* The Toolbar must exist in the content view and have an id of R.id.toolbar.<br/>
|
||||||
|
* Trying to call getSupportActionBar before this Activity's onPostCreate will cause a crash.
|
||||||
|
*/
|
||||||
|
public class ToolbarBindingActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPostCreate(Bundle savedInstanceState) {
|
||||||
|
super.onPostCreate(savedInstanceState);
|
||||||
|
|
||||||
|
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||||
|
if (toolbar != null) {
|
||||||
|
setSupportActionBar(toolbar);
|
||||||
|
//noinspection ConstantConditions
|
||||||
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -104,7 +104,6 @@ public class WebGuiActivity extends SyncthingActivity
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
setContentView(R.layout.activity_web_gui);
|
setContentView(R.layout.activity_web_gui);
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
||||||
|
|
||||||
mLoadingView = findViewById(R.id.loading);
|
mLoadingView = findViewById(R.id.loading);
|
||||||
loadCaCert();
|
loadCaCert();
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<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:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
@ -11,7 +18,7 @@
|
||||||
android:id="@android:id/empty"
|
android:id="@android:id/empty"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/directory_empty"
|
android:layout_gravity="center"
|
||||||
android:layout_centerInParent="true" />
|
android:text="@string/directory_empty" />
|
||||||
|
</FrameLayout>
|
||||||
</RelativeLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<include layout="@layout/widget_toolbar" />
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:id="@+id/scroller"
|
android:id="@+id/scroller"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="match_parent"
|
||||||
android:scrollbars="vertical"
|
android:scrollbars="vertical"
|
||||||
android:fillViewport="true">
|
android:fillViewport="true">
|
||||||
|
|
||||||
|
@ -16,9 +18,9 @@
|
||||||
android:gravity="top"
|
android:gravity="top"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:textIsSelectable="true"
|
android:textIsSelectable="true"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
</RelativeLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<android.support.v4.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:id="@+id/drawer_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
@ -9,10 +10,15 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<include layout="@layout/widget_toolbar" />
|
||||||
|
|
||||||
<android.support.design.widget.TabLayout
|
<android.support.design.widget.TabLayout
|
||||||
android:id="@+id/tabContainer"
|
android:id="@+id/tabContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?colorPrimary"
|
||||||
|
android:elevation="@dimen/toolbar_elevation"
|
||||||
|
app:theme="@style/ThemeOverlay.Syncthing.Toolbar" />
|
||||||
|
|
||||||
<android.support.v4.view.ViewPager
|
<android.support.v4.view.ViewPager
|
||||||
android:id="@+id/pager"
|
android:id="@+id/pager"
|
||||||
|
|
13
src/main/res/layout/activity_settings.xml
Normal file
13
src/main/res/layout/activity_settings.xml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?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>
|
|
@ -1,8 +1,10 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<include layout="@layout/widget_toolbar" />
|
||||||
|
|
||||||
<WebView
|
<WebView
|
||||||
android:id="@+id/webview"
|
android:id="@+id/webview"
|
||||||
|
@ -12,9 +14,8 @@
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/loading"
|
android:id="@+id/loading"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
@ -30,4 +31,4 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/web_gui_loading" />
|
android:text="@string/web_gui_loading" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</FrameLayout>
|
</LinearLayout>
|
||||||
|
|
10
src/main/res/layout/widget_toolbar.xml
Normal file
10
src/main/res/layout/widget_toolbar.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<android.support.v7.widget.Toolbar
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="?android:actionBarSize"
|
||||||
|
android:background="?colorPrimary"
|
||||||
|
android:elevation="@dimen/toolbar_elevation"
|
||||||
|
app:theme="@style/ThemeOverlay.Syncthing.Toolbar" />
|
|
@ -1,4 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<dimen name="material_divider_inset">72dp</dimen>
|
<dimen name="material_divider_inset">72dp</dimen>
|
||||||
|
<dimen name="toolbar_elevation">4dp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -50,6 +50,11 @@
|
||||||
<item name="android:minHeight">48dp</item>
|
<item name="android:minHeight">48dp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="Widget.Syncthing.DrawerArrowToggle" parent="Widget.AppCompat.DrawerArrowToggle">
|
||||||
|
<item name="spinBars">false</item>
|
||||||
|
<item name="color">@android:color/white</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<!-- Text appearances -->
|
<!-- Text appearances -->
|
||||||
<eat-comment />
|
<eat-comment />
|
||||||
|
|
||||||
|
|
|
@ -4,11 +4,10 @@
|
||||||
<!-- Activity themes -->
|
<!-- Activity themes -->
|
||||||
<eat-comment/>
|
<eat-comment/>
|
||||||
|
|
||||||
<style name="Theme.Syncthing.Base" parent="@style/Theme.AppCompat.Light.DarkActionBar">
|
<style name="Theme.Syncthing.Base" parent="@style/Theme.AppCompat.Light.NoActionBar">
|
||||||
<item name="colorPrimary">@color/primary</item>
|
<item name="colorPrimary">@color/primary</item>
|
||||||
<item name="colorPrimaryDark">@color/primary_dark</item>
|
<item name="colorPrimaryDark">@color/primary_dark</item>
|
||||||
<item name="colorAccent">@color/accent</item>
|
<item name="colorAccent">@color/accent</item>
|
||||||
<item name="actionBarTheme">@style/ThemeOverlay.Syncthing.ActionBar</item>
|
|
||||||
|
|
||||||
<item name="textAppearanceListItemPrimary">@style/TextAppearance.Syncthing.ListItemPrimary</item>
|
<item name="textAppearanceListItemPrimary">@style/TextAppearance.Syncthing.ListItemPrimary</item>
|
||||||
<item name="textAppearanceListItemSecondary">@style/TextAppearance.Syncthing.ListItemSecondary</item>
|
<item name="textAppearanceListItemSecondary">@style/TextAppearance.Syncthing.ListItemSecondary</item>
|
||||||
|
@ -16,12 +15,12 @@
|
||||||
|
|
||||||
<item name="android:listViewStyle">@style/Widget.Syncthing.ListView</item>
|
<item name="android:listViewStyle">@style/Widget.Syncthing.ListView</item>
|
||||||
<item name="android:listDivider">@drawable/list_divider_inset</item>
|
<item name="android:listDivider">@drawable/list_divider_inset</item>
|
||||||
|
<item name="drawerArrowStyle">@style/Widget.Syncthing.DrawerArrowToggle</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Syncthing" parent="Theme.Syncthing.Base"/>
|
<style name="Theme.Syncthing" parent="Theme.Syncthing.Base"/>
|
||||||
|
|
||||||
<style name="Theme.Syncthing.Translucent">
|
<style name="Theme.Syncthing.Translucent">
|
||||||
<item name="android:windowNoTitle">true</item>
|
|
||||||
<item name="android:windowBackground">@android:color/transparent</item>
|
<item name="android:windowBackground">@android:color/transparent</item>
|
||||||
<item name="android:colorBackgroundCacheHint">@null</item>
|
<item name="android:colorBackgroundCacheHint">@null</item>
|
||||||
<item name="android:windowIsTranslucent">true</item>
|
<item name="android:windowIsTranslucent">true</item>
|
||||||
|
@ -37,10 +36,10 @@
|
||||||
<item name="colorControlActivated">@color/accent</item>
|
<item name="colorControlActivated">@color/accent</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- ActionBar themes -->
|
<!-- Toolbar themes -->
|
||||||
<eat-comment/>
|
<eat-comment/>
|
||||||
|
|
||||||
<style name="ThemeOverlay.Syncthing.ActionBar" parent="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
<style name="ThemeOverlay.Syncthing.Toolbar" parent="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||||
<item name="colorAccent">@android:color/white</item>
|
<item name="colorAccent">@android:color/white</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue