mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-22 18:07:55 +00:00
Small redesign
Changes: 1. In the menu, the design of the selected item was changed, the icon of the current device was added and the image was removed 2. Changed the accent color to orange 3. Separators have been removed from almost all lists 4. The design of the selected item was changed in the menu, the icon of the current device was added and the image was removed 4. Changed the color of the toolbar to white or black (depending on the theme)
This commit is contained in:
parent
061b9b63ee
commit
8ddb28c001
@ -51,7 +51,7 @@
|
|||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:allowBackup="false"
|
android:allowBackup="false"
|
||||||
android:networkSecurityConfig="@xml/network_security_config"
|
android:networkSecurityConfig="@xml/network_security_config"
|
||||||
android:theme="@style/KdeConnectTheme"
|
android:theme="@style/KdeConnectTheme.NoActionBar"
|
||||||
android:name="org.kde.kdeconnect.MyApplication">
|
android:name="org.kde.kdeconnect.MyApplication">
|
||||||
|
|
||||||
<receiver
|
<receiver
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 36 KiB |
@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<size android:width="1000dp" android:height="2dp" />
|
|
||||||
<solid android:color="#cecbce"/>
|
|
||||||
</shape>
|
|
@ -1,12 +1,23 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:context="org.kde.kdeconnect.Plugins.MprisPlugin.MprisActivity">
|
||||||
|
|
||||||
|
<include layout="@layout/toolbar" android:id="@+id/toolbar_layout" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingBottom="25dp"
|
android:paddingBottom="25dp"
|
||||||
android:paddingLeft="25dp"
|
android:paddingLeft="25dp"
|
||||||
android:paddingRight="25dp"
|
android:paddingRight="25dp"
|
||||||
android:paddingTop="25dp">
|
android:paddingTop="25dp"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/album_art"
|
android:id="@+id/album_art"
|
||||||
@ -24,4 +35,5 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -1,14 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:drawableStart="@drawable/ic_warning"
|
|
||||||
android:drawablePadding="8dp"
|
android:drawablePadding="8dp"
|
||||||
android:drawableTint="?attr/colorControlNormal"
|
|
||||||
android:paddingTop="16dp"
|
android:paddingTop="16dp"
|
||||||
android:paddingBottom="12dp"
|
android:paddingBottom="12dp"
|
||||||
android:text="@string/on_non_trusted_message">
|
android:paddingLeft="16dp"
|
||||||
|
android:paddingRight="16dp"
|
||||||
|
android:text="@string/on_non_trusted_message"
|
||||||
|
app:drawableTint="?attr/colorControlNormal"
|
||||||
|
app:drawableStartCompat="@drawable/ic_warning">
|
||||||
|
|
||||||
</TextView>
|
</TextView>
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:drawableStart="@drawable/ic_wifi"
|
android:focusable="true"
|
||||||
android:drawablePadding="8dp"
|
android:drawablePadding="8dp"
|
||||||
android:drawableTint="?attr/colorControlNormal"
|
|
||||||
android:paddingTop="16dp"
|
android:paddingTop="16dp"
|
||||||
android:paddingBottom="12dp"
|
android:paddingBottom="12dp"
|
||||||
android:text="@string/no_wifi">
|
android:paddingLeft="16dp"
|
||||||
|
android:paddingRight="16dp"
|
||||||
|
android:text="@string/no_wifi"
|
||||||
|
app:drawableStartCompat="@drawable/ic_wifi"
|
||||||
|
app:drawableTint="?attr/colorControlNormal">
|
||||||
|
|
||||||
</TextView>
|
</TextView>
|
||||||
|
@ -1,9 +1,20 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.gridlayout.widget.GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:context="org.kde.kdeconnect.Plugins.BigscreenPlugin.BigscreenActivity">
|
||||||
|
|
||||||
|
<include layout="@layout/toolbar" android:id="@+id/toolbar_layout" />
|
||||||
|
|
||||||
|
<androidx.gridlayout.widget.GridLayout
|
||||||
xmlns:grid="http://schemas.android.com/apk/res-auto"
|
xmlns:grid="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
grid:useDefaultMargins="true">
|
grid:useDefaultMargins="true"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/home_button"
|
android:id="@+id/home_button"
|
||||||
@ -74,4 +85,5 @@
|
|||||||
android:contentDescription="@string/bigscreen_down"
|
android:contentDescription="@string/bigscreen_down"
|
||||||
android:src="@drawable/ic_arrow_downward_black_24dp"
|
android:src="@drawable/ic_arrow_downward_black_24dp"
|
||||||
android:theme="@style/DisableableButton" />
|
android:theme="@style/DisableableButton" />
|
||||||
</androidx.gridlayout.widget.GridLayout>
|
</androidx.gridlayout.widget.GridLayout>
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -1,10 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:context="org.kde.kdeconnect.UserInterface.CustomDevicesActivity">
|
||||||
|
|
||||||
|
<include layout="@layout/toolbar" android:id="@+id/toolbar_layout" />
|
||||||
|
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/recyclerView"
|
android:id="@+id/recyclerView"
|
||||||
@ -33,4 +42,5 @@
|
|||||||
android:layout_margin="@dimen/fab_margin"
|
android:layout_margin="@dimen/fab_margin"
|
||||||
app:elevation="@dimen/fab_elevation"
|
app:elevation="@dimen/fab_elevation"
|
||||||
android:src="@drawable/ic_add"/>
|
android:src="@drawable/ic_add"/>
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -119,7 +119,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:fillViewport="true"
|
android:fillViewport="true"
|
||||||
android:divider="@drawable/list_divider"
|
|
||||||
tools:context=".DeviceActivity"
|
tools:context=".DeviceActivity"
|
||||||
tools:listitem="@layout/list_item_with_icon_entry"/>
|
tools:listitem="@layout/list_item_with_icon_entry"
|
||||||
|
android:divider="@null"
|
||||||
|
android:dividerHeight="0dp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -1,13 +1,23 @@
|
|||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:context="org.kde.kdeconnect.Plugins.FindMyPhonePlugin.FindMyPhoneActivity">
|
||||||
|
|
||||||
|
<include layout="@layout/toolbar" android:id="@+id/toolbar_layout" />
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||||
android:paddingTop="@dimen/activity_vertical_margin"
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
tools:context="org.kde.kdeconnect.Plugins.FindMyPhonePlugin.FindMyPhoneActivity">
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/bFindMyPhone"
|
android:id="@+id/bFindMyPhone"
|
||||||
@ -19,5 +29,5 @@
|
|||||||
android:text="@string/findmyphone_found"
|
android:text="@string/findmyphone_found"
|
||||||
android:textSize="50sp" />
|
android:textSize="50sp" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
</RelativeLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -12,17 +12,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
tools:context="org.kde.kdeconnect.UserInterface.MainActivity">
|
tools:context="org.kde.kdeconnect.UserInterface.MainActivity">
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<include layout="@layout/toolbar" android:id="@+id/toolbar_layout" />
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
|
||||||
android:id="@+id/toolbar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="?attr/actionBarSize"
|
|
||||||
android:elevation="8dp"/>
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/container"
|
android:id="@+id/container"
|
||||||
@ -37,7 +27,6 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="start"
|
android:layout_gravity="start"
|
||||||
app:headerLayout="@layout/nav_header"
|
app:headerLayout="@layout/nav_header" />
|
||||||
style="?attr/mainNavigationViewStyle" />
|
|
||||||
|
|
||||||
</androidx.drawerlayout.widget.DrawerLayout>
|
</androidx.drawerlayout.widget.DrawerLayout>
|
||||||
|
@ -1,11 +1,22 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:context="org.kde.kdeconnect.Plugins.MousePadPlugin.MousePadActivity">
|
||||||
|
|
||||||
|
<include layout="@layout/toolbar" android:id="@+id/toolbar_layout" />
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
android:id="@+id/mousepad_view"
|
android:id="@+id/mousepad_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:keepScreenOn="true"
|
android:keepScreenOn="true"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@android:style/TextAppearance.Medium"
|
style="@android:style/TextAppearance.Medium"
|
||||||
@ -22,4 +33,6 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -1,15 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
tools:context="org.kde.kdeconnect.Plugins.MprisPlugin.MprisActivity">
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:elevation="8dp"
|
android:elevation="8dp"
|
||||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
android:theme="@style/ThemeOverlay.AppCompat.ActionBar">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
@ -29,6 +31,7 @@
|
|||||||
<androidx.viewpager2.widget.ViewPager2
|
<androidx.viewpager2.widget.ViewPager2
|
||||||
android:id="@+id/mpris_pager"
|
android:id="@+id/mpris_pager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
@ -1,9 +1,20 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:context="org.kde.kdeconnect.Plugins.NotificationsPlugin.NotificationFilterActivity">
|
||||||
|
|
||||||
|
<include layout="@layout/toolbar" android:id="@+id/toolbar_layout" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context="org.kde.kdeconnect.Plugins.NotificationsPlugin.NotificationFilterActivity">
|
tools:context="org.kde.kdeconnect.Plugins.NotificationsPlugin.NotificationFilterActivity"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tFilter"
|
android:id="@+id/tFilter"
|
||||||
@ -26,6 +37,9 @@
|
|||||||
android:id="@+id/lvFilterApps"
|
android:id="@+id/lvFilterApps"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:visibility="gone" />
|
android:visibility="gone"
|
||||||
|
android:divider="@android:color/transparent"
|
||||||
|
android:dividerHeight="4dp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -1,7 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<FrameLayout
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:context="org.kde.kdeconnect.UserInterface.PluginSettingsActivity">
|
||||||
|
|
||||||
|
<include layout="@layout/toolbar" android:id="@+id/toolbar_layout" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/fragmentPlaceHolder"
|
android:id="@+id/fragmentPlaceHolder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"/>
|
android:layout_height="match_parent"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -1,10 +1,21 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:context="org.kde.kdeconnect.Plugins.PresenterPlugin.PresenterActivity">
|
||||||
|
|
||||||
|
<include layout="@layout/toolbar" android:id="@+id/toolbar_layout" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
android:id="@+id/mpris_control_view"
|
android:id="@+id/mpris_control_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:padding="12dp"
|
android:padding="12dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@android:style/TextAppearance.Medium"
|
style="@android:style/TextAppearance.Medium"
|
||||||
@ -60,4 +71,5 @@
|
|||||||
android:theme="@style/DisableableButton" />
|
android:theme="@style/DisableableButton" />
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
@ -1,8 +1,18 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:context="org.kde.kdeconnect.Plugins.RunCommandPlugin.RunCommandActivity">
|
||||||
|
|
||||||
|
<include layout="@layout/toolbar" android:id="@+id/toolbar_layout" />
|
||||||
|
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
android:id="@+id/run_commands_list"
|
android:id="@+id/run_commands_list"
|
||||||
@ -10,7 +20,9 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_margin="4dp"
|
android:layout_margin="4dp"
|
||||||
android:addStatesFromChildren="true"
|
android:addStatesFromChildren="true"
|
||||||
android:orientation="vertical" />
|
android:orientation="vertical"
|
||||||
|
android:divider="@null"
|
||||||
|
android:dividerHeight="0dp" />
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
android:id="@+id/add_command_button"
|
android:id="@+id/add_command_button"
|
||||||
@ -33,4 +45,5 @@
|
|||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
21
res/layout/activity_share.xml
Normal file
21
res/layout/activity_share.xml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:context="org.kde.kdeconnect.Plugins.SharePlugin.ShareActivity">
|
||||||
|
|
||||||
|
<include layout="@layout/toolbar" android:id="@+id/toolbar_layout" />
|
||||||
|
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_width="match_parent">
|
||||||
|
|
||||||
|
<include
|
||||||
|
layout="@layout/devices_list"
|
||||||
|
android:id="@+id/devices_list_layout" />
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -13,8 +13,6 @@
|
|||||||
android:divider="@null"
|
android:divider="@null"
|
||||||
android:dividerHeight="0dp"
|
android:dividerHeight="0dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingLeft="16dip"
|
|
||||||
android:paddingRight="16dip"
|
|
||||||
tools:context=".MainActivity" />
|
tools:context=".MainActivity" />
|
||||||
|
|
||||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
@ -2,6 +2,7 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -9,14 +10,11 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:drawableBottom="@drawable/text_section_header"
|
|
||||||
android:drawablePadding="4dp"
|
android:drawablePadding="4dp"
|
||||||
android:paddingLeft="8dip"
|
android:paddingLeft="16dip"
|
||||||
android:paddingRight="8dip"
|
android:paddingRight="16dip"
|
||||||
android:textAllCaps="true"
|
android:textSize="16sp"
|
||||||
android:textColor="?android:textColorSecondary"
|
tools:text="Header" />
|
||||||
android:textSize="14sp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/list_item_category_empty_placeholder"
|
android:id="@+id/list_item_category_empty_placeholder"
|
||||||
|
@ -1,36 +1,51 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout 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:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="160dp"
|
android:layout_height="@dimen/nav_header_height"
|
||||||
android:background="@drawable/drawer_header"
|
|
||||||
android:gravity="bottom"
|
android:gravity="bottom"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||||
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
|
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||||
|
android:paddingStart="@dimen/nav_header_horizontal_margin"
|
||||||
|
android:paddingEnd="@dimen/nav_header_horizontal_margin"
|
||||||
|
android:paddingRight="@dimen/nav_header_horizontal_margin">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/device_type"
|
||||||
|
android:layout_width="52dp"
|
||||||
|
android:layout_height="52dp"
|
||||||
|
android:layout_gravity="top"
|
||||||
|
android:paddingTop="@dimen/nav_header_vertical_spacing"
|
||||||
|
android:paddingBottom="4dp"
|
||||||
|
tools:srcCompat="@drawable/ic_device_phone_32dp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="match_parent">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/kdeconnect_label"
|
android:id="@+id/kdeconnect_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingEnd="48dp"
|
|
||||||
android:paddingLeft="16dp"
|
|
||||||
android:paddingRight="48dp"
|
|
||||||
android:paddingStart="16dp"
|
|
||||||
android:paddingTop="8dp"
|
|
||||||
android:text="@string/kde_connect"
|
android:text="@string/kde_connect"
|
||||||
android:textColor="#FFF"
|
android:textAppearance="?attr/textAppearanceHeadline6" />
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/device_name"
|
android:id="@+id/device_name"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="0dp"
|
android:textAppearance="?attr/textAppearanceBody2"
|
||||||
android:paddingBottom="16dp"
|
android:textColor="@color/material_on_surface_emphasis_medium"
|
||||||
android:paddingEnd="48dp"
|
tools:text="My device" />
|
||||||
android:paddingLeft="16dp"
|
</LinearLayout>
|
||||||
android:paddingRight="48dp"
|
</LinearLayout>
|
||||||
android:paddingStart="16dp"
|
|
||||||
android:paddingTop="4dp"
|
|
||||||
android:text="My device"
|
|
||||||
android:textColor="#fff" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@ -1,14 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:drawableStart="@drawable/ic_warning"
|
|
||||||
android:drawableLeft="@drawable/ic_warning"
|
|
||||||
android:drawablePadding="8dp"
|
android:drawablePadding="8dp"
|
||||||
android:paddingTop="16dp"
|
android:paddingTop="16dp"
|
||||||
android:paddingBottom="12dp"
|
android:paddingBottom="12dp"
|
||||||
android:text="@string/on_non_trusted_message">
|
android:paddingLeft="16dip"
|
||||||
|
android:paddingRight="16dip"
|
||||||
|
android:text="@string/on_non_trusted_message"
|
||||||
|
app:drawableStartCompat="@drawable/ic_warning"
|
||||||
|
app:drawableLeftCompat="@drawable/ic_warning">
|
||||||
|
|
||||||
</TextView>
|
</TextView>
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="16dp"
|
android:paddingTop="16dp"
|
||||||
android:paddingBottom="12dp"
|
android:paddingBottom="12dp"
|
||||||
|
android:paddingLeft="16dp"
|
||||||
|
android:paddingRight="16dp"
|
||||||
android:text="@string/pairing_description"
|
android:text="@string/pairing_description"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:drawableStart="@drawable/ic_wifi"
|
android:focusable="true"
|
||||||
android:drawableLeft="@drawable/ic_wifi"
|
|
||||||
android:drawablePadding="8dp"
|
android:drawablePadding="8dp"
|
||||||
android:paddingTop="16dp"
|
android:paddingTop="16dp"
|
||||||
android:paddingBottom="12dp"
|
android:paddingBottom="12dp"
|
||||||
android:text="@string/no_wifi">
|
android:paddingLeft="16dp"
|
||||||
|
android:paddingRight="16dp"
|
||||||
|
android:text="@string/no_wifi"
|
||||||
|
app:drawableStartCompat="@drawable/ic_wifi"
|
||||||
|
app:drawableLeftCompat="@drawable/ic_wifi">
|
||||||
|
|
||||||
</TextView>
|
</TextView>
|
||||||
|
14
res/layout/toolbar.xml
Normal file
14
res/layout/toolbar.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:theme="@style/ThemeOverlay.AppCompat.ActionBar">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.Toolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
android:elevation="8dp"/>
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
@ -1,12 +1,24 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:context="org.kde.kdeconnect.UserInterface.TrustedNetworksActivity">
|
||||||
|
|
||||||
|
<include layout="@layout/toolbar" android:id="@+id/toolbar_layout" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/trusted_networks_list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||||
android:paddingTop="@dimen/activity_vertical_margin">
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:text="@string/allow_all_networks_text"
|
android:text="@string/allow_all_networks_text"
|
||||||
@ -35,4 +47,5 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -11,6 +11,8 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_margin="4dp"
|
android:layout_margin="4dp"
|
||||||
android:addStatesFromChildren="true"
|
android:addStatesFromChildren="true"
|
||||||
android:orientation="vertical" />
|
android:orientation="vertical"
|
||||||
|
android:divider="@null"
|
||||||
|
android:dividerHeight="0dp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="primaryDark">#333333</color>
|
<color name="primaryDark">@android:color/black</color>
|
||||||
<color name="darkGrey">#555555</color>
|
<color name="darkGrey">#555555</color>
|
||||||
<color name="darkToolbarBackground">#222222</color>
|
<color name="darkToolbarBackground">#222222</color>
|
||||||
<color name="darkStatusBarBackground">#333333</color>
|
<color name="darkStatusBarBackground">#333333</color>
|
||||||
@ -8,8 +8,10 @@
|
|||||||
<color name="on_high_contrast">@android:color/white</color>
|
<color name="on_high_contrast">@android:color/white</color>
|
||||||
<color name="text_color_primary">@android:color/white</color>
|
<color name="text_color_primary">@android:color/white</color>
|
||||||
<color name="text_color">@android:color/white</color>
|
<color name="text_color">@android:color/white</color>
|
||||||
<color name="toolbar_color">#222222</color>
|
<color name="toolbar_color">@android:color/black</color>
|
||||||
<color name="card_stroke_color">#8C8C8C</color>
|
<color name="card_stroke_color">#8C8C8C</color>
|
||||||
|
<color name="activity_background">@android:color/black</color>
|
||||||
|
<item name="lightMode" type="bool">false</item>
|
||||||
|
|
||||||
<!-- This is for dark theme. In dark theme both selected and unselected text in the
|
<!-- This is for dark theme. In dark theme both selected and unselected text in the
|
||||||
navigation bar should be white. This is different from the light theme as both states have
|
navigation bar should be white. This is different from the light theme as both states have
|
||||||
|
8
res/values-v21/styles.xml
Normal file
8
res/values-v21/styles.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<style name="KdeConnectTheme.NoActionBar" parent="KdeConnectThemeBase.NoActionBar">
|
||||||
|
<item name="android:statusBarColor">#65000000</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</resources>
|
9
res/values-v23/styles.xml
Normal file
9
res/values-v23/styles.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<style name="KdeConnectTheme.NoActionBar" parent="KdeConnectThemeBase.NoActionBar">
|
||||||
|
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||||
|
<item name="android:windowLightStatusBar">@bool/lightMode</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</resources>
|
@ -1,6 +1,4 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<!-- The style to use on the MainActivity's NavigationView -->
|
|
||||||
<attr name="mainNavigationViewStyle" format="reference" />
|
|
||||||
<!-- A high-contrast color for important visual elements (for less important elements, use colorControlNormal instead) -->
|
<!-- A high-contrast color for important visual elements (for less important elements, use colorControlNormal instead) -->
|
||||||
<attr name="colorHighContrast" format="color" />
|
<attr name="colorHighContrast" format="color" />
|
||||||
</resources>
|
</resources>
|
@ -1,13 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="primary">#F67400</color>
|
<color name="primary">#F67400</color>
|
||||||
<color name="primaryDark">#BD5900</color>
|
<color name="primaryDark">@android:color/white</color>
|
||||||
<color name="accent">#4ebffa</color>
|
<color name="accent">#F67400</color>
|
||||||
<color name="disabled_grey">#EEEEEE</color>
|
<color name="disabled_grey">#EEEEEE</color>
|
||||||
<color name="on_secondary">@android:color/white</color>
|
<color name="on_secondary">@android:color/white</color>
|
||||||
<color name="on_high_contrast">@android:color/black</color>
|
<color name="on_high_contrast">@android:color/black</color>
|
||||||
<color name="text_color_primary">@android:color/black</color>
|
<color name="text_color_primary">@android:color/black</color>
|
||||||
<color name="text_color">@android:color/black</color>
|
<color name="text_color">@android:color/black</color>
|
||||||
<color name="toolbar_color">#F67400</color>
|
<color name="toolbar_color">@android:color/white</color>
|
||||||
<color name="card_stroke_color">#C8C8C8</color>
|
<color name="card_stroke_color">#C8C8C8</color>
|
||||||
|
<color name="activity_background">@android:color/white</color>
|
||||||
|
<item name="lightMode" type="bool">true</item>
|
||||||
</resources>
|
</resources>
|
@ -5,4 +5,7 @@
|
|||||||
<dimen name="key_height">48dip</dimen>
|
<dimen name="key_height">48dip</dimen>
|
||||||
<dimen name="fab_margin">16dp</dimen>
|
<dimen name="fab_margin">16dp</dimen>
|
||||||
<dimen name="fab_elevation">6dp</dimen>
|
<dimen name="fab_elevation">6dp</dimen>
|
||||||
|
<dimen name="nav_header_horizontal_margin">16dp</dimen>
|
||||||
|
<dimen name="nav_header_vertical_spacing">8dp</dimen>
|
||||||
|
<dimen name="nav_header_height">112dp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<!-- NoActionBar because we use a Toolbar widget as ActionBar -->
|
<!-- NoActionBar because we use a Toolbar widget as ActionBar -->
|
||||||
<style name="KdeConnectThemeBase" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
<style name="KdeConnectThemeBase" parent="Theme.MaterialComponents.DayNight">
|
||||||
<!-- The main color attributes -->
|
<!-- The main color attributes -->
|
||||||
<!-- The three colors used by system widgets, according to https://chris.banes.me/2014/10/17/appcompat-v21/ -->
|
<!-- The three colors used by system widgets, according to https://chris.banes.me/2014/10/17/appcompat-v21/ -->
|
||||||
<item name="colorPrimary">@color/primary</item>
|
<item name="colorPrimary">@color/primary</item>
|
||||||
@ -9,6 +9,8 @@
|
|||||||
<item name="colorOnSecondary">@color/on_secondary</item>
|
<item name="colorOnSecondary">@color/on_secondary</item>
|
||||||
<item name="colorAccent">@color/accent</item>
|
<item name="colorAccent">@color/accent</item>
|
||||||
<item name="colorHighContrast">@color/on_high_contrast</item>
|
<item name="colorHighContrast">@color/on_high_contrast</item>
|
||||||
|
<item name="android:windowBackground">@color/activity_background</item>
|
||||||
|
<item name="android:colorBackground">@color/activity_background</item>
|
||||||
<!-- TODO: The 2 items below change too much (eg snackbar text is now black, should be white) -->
|
<!-- TODO: The 2 items below change too much (eg snackbar text is now black, should be white) -->
|
||||||
<item name="android:textColorPrimary">@color/text_color_primary</item>
|
<item name="android:textColorPrimary">@color/text_color_primary</item>
|
||||||
<item name="android:textColor">@color/text_color</item>
|
<item name="android:textColor">@color/text_color</item>
|
||||||
@ -18,7 +20,6 @@
|
|||||||
|
|
||||||
<!-- Style overrides -->
|
<!-- Style overrides -->
|
||||||
<item name="actionModeStyle">@style/ActionModeStyle</item>
|
<item name="actionModeStyle">@style/ActionModeStyle</item>
|
||||||
<item name="mainNavigationViewStyle">@style/MainNavigationView</item>
|
|
||||||
<item name="toolbarStyle">@style/KdeConnectTheme.Toolbar</item>
|
<item name="toolbarStyle">@style/KdeConnectTheme.Toolbar</item>
|
||||||
|
|
||||||
<!-- Theme overrides -->
|
<!-- Theme overrides -->
|
||||||
|
@ -124,6 +124,24 @@ public class Device implements BaseLink.PacketReceiver {
|
|||||||
return "desktop";
|
return "desktop";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Drawable getIcon(Context context) {
|
||||||
|
int drawableId;
|
||||||
|
switch (this) {
|
||||||
|
case Phone:
|
||||||
|
drawableId = R.drawable.ic_device_phone_32dp;
|
||||||
|
break;
|
||||||
|
case Tablet:
|
||||||
|
drawableId = R.drawable.ic_device_tablet_32dp;
|
||||||
|
break;
|
||||||
|
case Tv:
|
||||||
|
drawableId = R.drawable.ic_device_tv_32dp;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
drawableId = R.drawable.ic_device_laptop_32dp;
|
||||||
|
}
|
||||||
|
return ContextCompat.getDrawable(context, drawableId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface PairingCallback {
|
public interface PairingCallback {
|
||||||
@ -178,21 +196,7 @@ public class Device implements BaseLink.PacketReceiver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Drawable getIcon() {
|
public Drawable getIcon() {
|
||||||
int drawableId;
|
return deviceType.getIcon(context);
|
||||||
switch (deviceType) {
|
|
||||||
case Phone:
|
|
||||||
drawableId = R.drawable.ic_device_phone_32dp;
|
|
||||||
break;
|
|
||||||
case Tablet:
|
|
||||||
drawableId = R.drawable.ic_device_tablet_32dp;
|
|
||||||
break;
|
|
||||||
case Tv:
|
|
||||||
drawableId = R.drawable.ic_device_tv_32dp;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
drawableId = R.drawable.ic_device_laptop_32dp;
|
|
||||||
}
|
|
||||||
return ContextCompat.getDrawable(context, drawableId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeviceType getDeviceType() {
|
public DeviceType getDeviceType() {
|
||||||
|
@ -25,6 +25,7 @@ import org.kde.kdeconnect_tp.R;
|
|||||||
import org.kde.kdeconnect_tp.databinding.ActivityBigscreenBinding;
|
import org.kde.kdeconnect_tp.databinding.ActivityBigscreenBinding;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public class BigscreenActivity extends AppCompatActivity {
|
public class BigscreenActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@ -38,6 +39,10 @@ public class BigscreenActivity extends AppCompatActivity {
|
|||||||
final ActivityBigscreenBinding binding = ActivityBigscreenBinding.inflate(getLayoutInflater());
|
final ActivityBigscreenBinding binding = ActivityBigscreenBinding.inflate(getLayoutInflater());
|
||||||
setContentView(binding.getRoot());
|
setContentView(binding.getRoot());
|
||||||
|
|
||||||
|
setSupportActionBar(binding.toolbarLayout.toolbar);
|
||||||
|
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||||
|
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||||
|
|
||||||
final String deviceId = getIntent().getStringExtra("deviceId");
|
final String deviceId = getIntent().getStringExtra("deviceId");
|
||||||
|
|
||||||
if (!SpeechRecognizer.isRecognitionAvailable(this)) {
|
if (!SpeechRecognizer.isRecognitionAvailable(this)) {
|
||||||
|
@ -11,11 +11,14 @@ import android.view.Window;
|
|||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.appcompat.widget.Toolbar;
|
||||||
|
|
||||||
import org.kde.kdeconnect.BackgroundService;
|
import org.kde.kdeconnect.BackgroundService;
|
||||||
import org.kde.kdeconnect.UserInterface.ThemeUtil;
|
import org.kde.kdeconnect.UserInterface.ThemeUtil;
|
||||||
import org.kde.kdeconnect_tp.databinding.ActivityFindMyPhoneBinding;
|
import org.kde.kdeconnect_tp.databinding.ActivityFindMyPhoneBinding;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public class FindMyPhoneActivity extends AppCompatActivity {
|
public class FindMyPhoneActivity extends AppCompatActivity {
|
||||||
static final String EXTRA_DEVICE_ID = "deviceId";
|
static final String EXTRA_DEVICE_ID = "deviceId";
|
||||||
|
|
||||||
@ -29,6 +32,10 @@ public class FindMyPhoneActivity extends AppCompatActivity {
|
|||||||
final ActivityFindMyPhoneBinding binding = ActivityFindMyPhoneBinding.inflate(getLayoutInflater());
|
final ActivityFindMyPhoneBinding binding = ActivityFindMyPhoneBinding.inflate(getLayoutInflater());
|
||||||
setContentView(binding.getRoot());
|
setContentView(binding.getRoot());
|
||||||
|
|
||||||
|
setSupportActionBar(binding.toolbarLayout.toolbar);
|
||||||
|
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||||
|
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||||
|
|
||||||
if (!getIntent().hasExtra(EXTRA_DEVICE_ID)) {
|
if (!getIntent().hasExtra(EXTRA_DEVICE_ID)) {
|
||||||
Log.e("FindMyPhoneActivity", "You must include the deviceId for which this activity is started as an intent EXTRA");
|
Log.e("FindMyPhoneActivity", "You must include the deviceId for which this activity is started as an intent EXTRA");
|
||||||
finish();
|
finish();
|
||||||
|
@ -26,6 +26,8 @@ import org.kde.kdeconnect.BackgroundService;
|
|||||||
import org.kde.kdeconnect.UserInterface.ThemeUtil;
|
import org.kde.kdeconnect.UserInterface.ThemeUtil;
|
||||||
import org.kde.kdeconnect_tp.R;
|
import org.kde.kdeconnect_tp.R;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public class MousePadActivity extends AppCompatActivity implements GestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener, MousePadGestureDetector.OnGestureListener {
|
public class MousePadActivity extends AppCompatActivity implements GestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener, MousePadGestureDetector.OnGestureListener {
|
||||||
private String deviceId;
|
private String deviceId;
|
||||||
|
|
||||||
@ -76,6 +78,10 @@ public class MousePadActivity extends AppCompatActivity implements GestureDetect
|
|||||||
|
|
||||||
setContentView(R.layout.activity_mousepad);
|
setContentView(R.layout.activity_mousepad);
|
||||||
|
|
||||||
|
setSupportActionBar(findViewById(R.id.toolbar));
|
||||||
|
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||||
|
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||||
|
|
||||||
deviceId = getIntent().getStringExtra("deviceId");
|
deviceId = getIntent().getStringExtra("deviceId");
|
||||||
|
|
||||||
getWindow().getDecorView().setHapticFeedbackEnabled(true);
|
getWindow().getDecorView().setHapticFeedbackEnabled(true);
|
||||||
|
@ -22,6 +22,8 @@ import org.kde.kdeconnect.UserInterface.ThemeUtil;
|
|||||||
import org.kde.kdeconnect_tp.R;
|
import org.kde.kdeconnect_tp.R;
|
||||||
import org.kde.kdeconnect_tp.databinding.ActivityMprisBinding;
|
import org.kde.kdeconnect_tp.databinding.ActivityMprisBinding;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public class MprisActivity extends AppCompatActivity {
|
public class MprisActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private ActivityMprisBinding activityMprisBinding;
|
private ActivityMprisBinding activityMprisBinding;
|
||||||
@ -85,7 +87,7 @@ public class MprisActivity extends AppCompatActivity {
|
|||||||
tabLayoutMediator.attach();
|
tabLayoutMediator.attach();
|
||||||
|
|
||||||
setSupportActionBar(activityMprisBinding.toolbar);
|
setSupportActionBar(activityMprisBinding.toolbar);
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static class MprisPagerAdapter extends ExtendedFragmentAdapter {
|
static class MprisPagerAdapter extends ExtendedFragmentAdapter {
|
||||||
|
@ -34,6 +34,7 @@ import org.kde.kdeconnect_tp.databinding.ActivityNotificationFilterBinding;
|
|||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
//TODO: Turn this into a PluginSettingsFragment
|
//TODO: Turn this into a PluginSettingsFragment
|
||||||
public class NotificationFilterActivity extends AppCompatActivity {
|
public class NotificationFilterActivity extends AppCompatActivity {
|
||||||
@ -96,6 +97,10 @@ public class NotificationFilterActivity extends AppCompatActivity {
|
|||||||
setContentView(binding.getRoot());
|
setContentView(binding.getRoot());
|
||||||
appDatabase = new AppDatabase(NotificationFilterActivity.this, false);
|
appDatabase = new AppDatabase(NotificationFilterActivity.this, false);
|
||||||
|
|
||||||
|
setSupportActionBar(binding.toolbarLayout.toolbar);
|
||||||
|
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||||
|
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||||
|
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
PackageManager packageManager = getPackageManager();
|
PackageManager packageManager = getPackageManager();
|
||||||
List<ApplicationInfo> appList = packageManager.getInstalledApplications(0);
|
List<ApplicationInfo> appList = packageManager.getInstalledApplications(0);
|
||||||
|
@ -30,6 +30,8 @@ import org.kde.kdeconnect.UserInterface.ThemeUtil;
|
|||||||
import org.kde.kdeconnect_tp.R;
|
import org.kde.kdeconnect_tp.R;
|
||||||
import org.kde.kdeconnect_tp.databinding.ActivityPresenterBinding;
|
import org.kde.kdeconnect_tp.databinding.ActivityPresenterBinding;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public class PresenterActivity extends AppCompatActivity implements SensorEventListener {
|
public class PresenterActivity extends AppCompatActivity implements SensorEventListener {
|
||||||
private ActivityPresenterBinding binding;
|
private ActivityPresenterBinding binding;
|
||||||
|
|
||||||
@ -86,6 +88,10 @@ public class PresenterActivity extends AppCompatActivity implements SensorEventL
|
|||||||
binding = ActivityPresenterBinding.inflate(getLayoutInflater());
|
binding = ActivityPresenterBinding.inflate(getLayoutInflater());
|
||||||
setContentView(binding.getRoot());
|
setContentView(binding.getRoot());
|
||||||
|
|
||||||
|
setSupportActionBar(binding.toolbarLayout.toolbar);
|
||||||
|
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||||
|
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||||
|
|
||||||
final String deviceId = getIntent().getStringExtra("deviceId");
|
final String deviceId = getIntent().getStringExtra("deviceId");
|
||||||
|
|
||||||
BackgroundService.RunWithPlugin(this, deviceId, PresenterPlugin.class, plugin -> runOnUiThread(() -> {
|
BackgroundService.RunWithPlugin(this, deviceId, PresenterPlugin.class, plugin -> runOnUiThread(() -> {
|
||||||
|
@ -35,6 +35,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public class RunCommandActivity extends AppCompatActivity {
|
public class RunCommandActivity extends AppCompatActivity {
|
||||||
private ActivityRunCommandBinding binding;
|
private ActivityRunCommandBinding binding;
|
||||||
@ -81,6 +82,10 @@ public class RunCommandActivity extends AppCompatActivity {
|
|||||||
binding = ActivityRunCommandBinding.inflate(getLayoutInflater());
|
binding = ActivityRunCommandBinding.inflate(getLayoutInflater());
|
||||||
setContentView(binding.getRoot());
|
setContentView(binding.getRoot());
|
||||||
|
|
||||||
|
setSupportActionBar(binding.toolbarLayout.toolbar);
|
||||||
|
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||||
|
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||||
|
|
||||||
deviceId = getIntent().getStringExtra("deviceId");
|
deviceId = getIntent().getStringExtra("deviceId");
|
||||||
|
|
||||||
boolean canAddCommands = false;
|
boolean canAddCommands = false;
|
||||||
|
@ -17,19 +17,20 @@ import androidx.appcompat.app.AppCompatActivity;
|
|||||||
|
|
||||||
import org.kde.kdeconnect.BackgroundService;
|
import org.kde.kdeconnect.BackgroundService;
|
||||||
import org.kde.kdeconnect.Device;
|
import org.kde.kdeconnect.Device;
|
||||||
import org.kde.kdeconnect.UserInterface.List.EntryItem;
|
import org.kde.kdeconnect.UserInterface.List.EntryItemWithIcon;
|
||||||
import org.kde.kdeconnect.UserInterface.List.ListAdapter;
|
import org.kde.kdeconnect.UserInterface.List.ListAdapter;
|
||||||
import org.kde.kdeconnect.UserInterface.List.SectionItem;
|
import org.kde.kdeconnect.UserInterface.List.SectionItem;
|
||||||
import org.kde.kdeconnect.UserInterface.ThemeUtil;
|
import org.kde.kdeconnect.UserInterface.ThemeUtil;
|
||||||
import org.kde.kdeconnect_tp.R;
|
import org.kde.kdeconnect_tp.R;
|
||||||
import org.kde.kdeconnect_tp.databinding.DevicesListBinding;
|
import org.kde.kdeconnect_tp.databinding.ActivityShareBinding;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
|
||||||
public class ShareActivity extends AppCompatActivity {
|
public class ShareActivity extends AppCompatActivity {
|
||||||
private DevicesListBinding binding;
|
private ActivityShareBinding binding;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
@ -54,13 +55,13 @@ public class ShareActivity extends AppCompatActivity {
|
|||||||
updateComputerList();
|
updateComputerList();
|
||||||
BackgroundService.RunCommand(ShareActivity.this, BackgroundService::onNetworkChange);
|
BackgroundService.RunCommand(ShareActivity.this, BackgroundService::onNetworkChange);
|
||||||
|
|
||||||
binding.refreshListLayout.setRefreshing(true);
|
binding.devicesListLayout.refreshListLayout.setRefreshing(true);
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
Thread.sleep(1500);
|
Thread.sleep(1500);
|
||||||
} catch (InterruptedException ignored) {
|
} catch (InterruptedException ignored) {
|
||||||
}
|
}
|
||||||
runOnUiThread(() -> binding.refreshListLayout.setRefreshing(false));
|
runOnUiThread(() -> binding.devicesListLayout.refreshListLayout.setRefreshing(false));
|
||||||
}).start();
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,14 +86,14 @@ public class ShareActivity extends AppCompatActivity {
|
|||||||
for (Device d : devices) {
|
for (Device d : devices) {
|
||||||
if (d.isReachable() && d.isPaired()) {
|
if (d.isReachable() && d.isPaired()) {
|
||||||
devicesList.add(d);
|
devicesList.add(d);
|
||||||
items.add(new EntryItem(d.getName()));
|
items.add(new EntryItemWithIcon(d.getName(), d.getIcon()));
|
||||||
section.isEmpty = false;
|
section.isEmpty = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
runOnUiThread(() -> {
|
runOnUiThread(() -> {
|
||||||
binding.devicesList.setAdapter(new ListAdapter(ShareActivity.this, items));
|
binding.devicesListLayout.devicesList.setAdapter(new ListAdapter(ShareActivity.this, items));
|
||||||
binding.devicesList.setOnItemClickListener((adapterView, view, i, l) -> {
|
binding.devicesListLayout.devicesList.setOnItemClickListener((adapterView, view, i, l) -> {
|
||||||
Device device = devicesList.get(i - 1); //NOTE: -1 because of the title!
|
Device device = devicesList.get(i - 1); //NOTE: -1 because of the title!
|
||||||
BackgroundService.RunWithPlugin(this, device.getDeviceId(), SharePlugin.class, plugin -> plugin.share(intent));
|
BackgroundService.RunWithPlugin(this, device.getDeviceId(), SharePlugin.class, plugin -> plugin.share(intent));
|
||||||
finish();
|
finish();
|
||||||
@ -106,11 +107,15 @@ public class ShareActivity extends AppCompatActivity {
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
ThemeUtil.setUserPreferredTheme(this);
|
ThemeUtil.setUserPreferredTheme(this);
|
||||||
|
|
||||||
binding = DevicesListBinding.inflate(getLayoutInflater());
|
binding = ActivityShareBinding.inflate(getLayoutInflater());
|
||||||
setContentView(binding.getRoot());
|
setContentView(binding.getRoot());
|
||||||
|
|
||||||
|
setSupportActionBar(binding.toolbarLayout.toolbar);
|
||||||
|
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||||
|
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||||
|
|
||||||
ActionBar actionBar = getSupportActionBar();
|
ActionBar actionBar = getSupportActionBar();
|
||||||
binding.refreshListLayout.setOnRefreshListener(this::updateComputerListAction);
|
binding.devicesListLayout.refreshListLayout.setOnRefreshListener(this::updateComputerListAction);
|
||||||
if (actionBar != null) {
|
if (actionBar != null) {
|
||||||
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_SHOW_CUSTOM);
|
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_SHOW_CUSTOM);
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,7 @@ import org.kde.kdeconnect_tp.databinding.ActivityCustomDevicesBinding;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
//TODO: Require wifi connection so entries can be verified
|
//TODO: Require wifi connection so entries can be verified
|
||||||
//TODO: Resolve to ip address and don't allow unresolvable or duplicates based on ip address
|
//TODO: Resolve to ip address and don't allow unresolvable or duplicates based on ip address
|
||||||
@ -63,6 +64,10 @@ public class CustomDevicesActivity extends AppCompatActivity implements CustomDe
|
|||||||
emptyListMessage = binding.emptyListMessage;
|
emptyListMessage = binding.emptyListMessage;
|
||||||
final FloatingActionButton fab = binding.floatingActionButton;
|
final FloatingActionButton fab = binding.floatingActionButton;
|
||||||
|
|
||||||
|
setSupportActionBar(binding.toolbarLayout.toolbar);
|
||||||
|
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||||
|
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||||
|
|
||||||
fab.setOnClickListener(v -> showEditTextDialog(""));
|
fab.setOnClickListener(v -> showEditTextDialog(""));
|
||||||
|
|
||||||
sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
|
sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
|
@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2014 Albert Vaca Cintora <albertvaka@gmail.com>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.kde.kdeconnect.UserInterface.List;
|
||||||
|
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import org.kde.kdeconnect_tp.databinding.ListItemWithIconEntryBinding;
|
||||||
|
|
||||||
|
public class EntryItemWithIcon implements ListAdapter.Item {
|
||||||
|
protected final String title;
|
||||||
|
protected final String subtitle;
|
||||||
|
protected final Drawable icon;
|
||||||
|
|
||||||
|
public EntryItemWithIcon(String title, Drawable icon) {
|
||||||
|
this(title, null, icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected EntryItemWithIcon(String title, String subtitle, Drawable icon) {
|
||||||
|
this.title = title;
|
||||||
|
this.subtitle = subtitle;
|
||||||
|
this.icon = icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public View inflateView(@NonNull LayoutInflater layoutInflater) {
|
||||||
|
final ListItemWithIconEntryBinding binding = ListItemWithIconEntryBinding.inflate(layoutInflater);
|
||||||
|
|
||||||
|
binding.listItemEntryTitle.setText(title);
|
||||||
|
binding.listItemEntryIcon.setImageDrawable(icon);
|
||||||
|
|
||||||
|
if (subtitle != null) {
|
||||||
|
binding.listItemEntrySummary.setVisibility(View.VISIBLE);
|
||||||
|
binding.listItemEntrySummary.setText(subtitle);
|
||||||
|
}
|
||||||
|
|
||||||
|
return binding.getRoot();
|
||||||
|
}
|
||||||
|
}
|
@ -15,6 +15,7 @@ import android.view.Menu;
|
|||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.SubMenu;
|
import android.view.SubMenu;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
@ -81,12 +82,12 @@ public class MainActivity extends AppCompatActivity implements SharedPreferences
|
|||||||
|
|
||||||
mNavigationView = binding.navigationDrawer;
|
mNavigationView = binding.navigationDrawer;
|
||||||
mDrawerLayout = binding.drawerLayout;
|
mDrawerLayout = binding.drawerLayout;
|
||||||
final Toolbar mToolbar = binding.toolbar;
|
|
||||||
|
|
||||||
View mDrawerHeader = mNavigationView.getHeaderView(0);
|
View mDrawerHeader = mNavigationView.getHeaderView(0);
|
||||||
mNavViewDeviceName = mDrawerHeader.findViewById(R.id.device_name);
|
mNavViewDeviceName = mDrawerHeader.findViewById(R.id.device_name);
|
||||||
|
ImageView mNavViewDeviceType = mDrawerHeader.findViewById(R.id.device_type);
|
||||||
|
|
||||||
setSupportActionBar(mToolbar);
|
setSupportActionBar(binding.toolbarLayout.toolbar);
|
||||||
|
|
||||||
ActionBar actionBar = getSupportActionBar();
|
ActionBar actionBar = getSupportActionBar();
|
||||||
|
|
||||||
@ -112,6 +113,7 @@ public class MainActivity extends AppCompatActivity implements SharedPreferences
|
|||||||
// it can trigger a background fetch from the internet that will eventually update the preference
|
// it can trigger a background fetch from the internet that will eventually update the preference
|
||||||
PreferenceManager.getDefaultSharedPreferences(this).registerOnSharedPreferenceChangeListener(this);
|
PreferenceManager.getDefaultSharedPreferences(this).registerOnSharedPreferenceChangeListener(this);
|
||||||
String deviceName = DeviceHelper.getDeviceName(this);
|
String deviceName = DeviceHelper.getDeviceName(this);
|
||||||
|
mNavViewDeviceType.setImageDrawable(DeviceHelper.getDeviceType(this).getIcon(this));
|
||||||
mNavViewDeviceName.setText(deviceName);
|
mNavViewDeviceName.setText(deviceName);
|
||||||
|
|
||||||
mNavigationView.setNavigationItemSelectedListener(menuItem -> {
|
mNavigationView.setNavigationItemSelectedListener(menuItem -> {
|
||||||
|
@ -18,6 +18,8 @@ import androidx.appcompat.app.AppCompatActivity;
|
|||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public class PluginSettingsActivity
|
public class PluginSettingsActivity
|
||||||
extends AppCompatActivity
|
extends AppCompatActivity
|
||||||
implements PluginPreference.PluginPreferenceCallback {
|
implements PluginPreference.PluginPreferenceCallback {
|
||||||
@ -35,9 +37,9 @@ public class PluginSettingsActivity
|
|||||||
|
|
||||||
setContentView(R.layout.activity_plugin_settings);
|
setContentView(R.layout.activity_plugin_settings);
|
||||||
|
|
||||||
if (getSupportActionBar() != null) {
|
setSupportActionBar(findViewById(R.id.toolbar));
|
||||||
getSupportActionBar().setDefaultDisplayHomeAsUpEnabled(true);
|
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||||
}
|
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||||
|
|
||||||
String pluginKey = null;
|
String pluginKey = null;
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ import org.kde.kdeconnect_tp.databinding.TrustedNetworkListBinding;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public class TrustedNetworksActivity extends AppCompatActivity {
|
public class TrustedNetworksActivity extends AppCompatActivity {
|
||||||
private TrustedNetworkListBinding binding;
|
private TrustedNetworkListBinding binding;
|
||||||
@ -48,6 +49,10 @@ public class TrustedNetworksActivity extends AppCompatActivity {
|
|||||||
setContentView(binding.getRoot());
|
setContentView(binding.getRoot());
|
||||||
trustedNetworksView = binding.list;
|
trustedNetworksView = binding.list;
|
||||||
|
|
||||||
|
setSupportActionBar(binding.toolbarLayout.toolbar);
|
||||||
|
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||||
|
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||||
|
|
||||||
trustedNetworkHelper = new TrustedNetworkHelper(getApplicationContext());
|
trustedNetworkHelper = new TrustedNetworkHelper(getApplicationContext());
|
||||||
trustedNetworks = new ArrayList<>();
|
trustedNetworks = new ArrayList<>();
|
||||||
Collections.addAll(trustedNetworks, trustedNetworkHelper.read());
|
Collections.addAll(trustedNetworks, trustedNetworkHelper.read());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user