mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-22 09:58:08 +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:allowBackup="false"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:theme="@style/KdeConnectTheme"
|
||||
android:theme="@style/KdeConnectTheme.NoActionBar"
|
||||
android:name="org.kde.kdeconnect.MyApplication">
|
||||
|
||||
<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,27 +1,39 @@
|
||||
<?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"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="25dp"
|
||||
android:paddingLeft="25dp"
|
||||
android:paddingRight="25dp"
|
||||
android:paddingTop="25dp">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="org.kde.kdeconnect.Plugins.MprisPlugin.MprisActivity">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/album_art"
|
||||
android:layout_width="0dp"
|
||||
<include layout="@layout/toolbar" android:id="@+id/toolbar_layout" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/mpris_coverart_description"
|
||||
android:scaleType="fitCenter" />
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="25dp"
|
||||
android:paddingLeft="25dp"
|
||||
android:paddingRight="25dp"
|
||||
android:paddingTop="25dp"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<include
|
||||
layout="@layout/mpris_control"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
<ImageView
|
||||
android:id="@+id/album_art"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/mpris_coverart_description"
|
||||
android:scaleType="fitCenter" />
|
||||
|
||||
</LinearLayout>
|
||||
<include
|
||||
layout="@layout/mpris_control"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -1,14 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="false"
|
||||
android:drawableStart="@drawable/ic_warning"
|
||||
android:drawablePadding="8dp"
|
||||
android:drawableTint="?attr/colorControlNormal"
|
||||
android:paddingTop="16dp"
|
||||
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>
|
||||
|
@ -1,14 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:drawableStart="@drawable/ic_wifi"
|
||||
android:focusable="true"
|
||||
android:drawablePadding="8dp"
|
||||
android:drawableTint="?attr/colorControlNormal"
|
||||
android:paddingTop="16dp"
|
||||
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>
|
||||
|
@ -1,77 +1,89 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.gridlayout.widget.GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:grid="http://schemas.android.com/apk/res-auto"
|
||||
<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"
|
||||
grid:useDefaultMargins="true">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="org.kde.kdeconnect.Plugins.BigscreenPlugin.BigscreenActivity">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/home_button"
|
||||
grid:layout_column="0"
|
||||
grid:layout_row="0"
|
||||
grid:layout_columnWeight="1"
|
||||
grid:layout_rowWeight="1"
|
||||
android:contentDescription="@string/bigscreen_home"
|
||||
android:src="@drawable/ic_home_black_24dp"
|
||||
android:theme="@style/DisableableButton" />
|
||||
<include layout="@layout/toolbar" android:id="@+id/toolbar_layout" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/up_button"
|
||||
grid:layout_column="1"
|
||||
grid:layout_row="0"
|
||||
grid:layout_columnWeight="1"
|
||||
grid:layout_rowWeight="1"
|
||||
android:contentDescription="@string/bigscreen_up"
|
||||
android:src="@drawable/ic_arrow_upward_black_24dp"
|
||||
android:theme="@style/DisableableButton" />
|
||||
<androidx.gridlayout.widget.GridLayout
|
||||
xmlns:grid="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
grid:useDefaultMargins="true"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/mic_button"
|
||||
grid:layout_column="2"
|
||||
grid:layout_columnWeight="1"
|
||||
grid:layout_row="0"
|
||||
grid:layout_rowWeight="1"
|
||||
android:contentDescription="@string/bigscreen_mic"
|
||||
android:src="@drawable/ic_mic_black"
|
||||
android:theme="@style/DisableableButton" />
|
||||
<ImageButton
|
||||
android:id="@+id/home_button"
|
||||
grid:layout_column="0"
|
||||
grid:layout_row="0"
|
||||
grid:layout_columnWeight="1"
|
||||
grid:layout_rowWeight="1"
|
||||
android:contentDescription="@string/bigscreen_home"
|
||||
android:src="@drawable/ic_home_black_24dp"
|
||||
android:theme="@style/DisableableButton" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/left_button"
|
||||
grid:layout_column="0"
|
||||
grid:layout_row="1"
|
||||
grid:layout_columnWeight="1"
|
||||
grid:layout_rowWeight="1"
|
||||
android:contentDescription="@string/bigscreen_left"
|
||||
android:src="@drawable/ic_arrow_back_black_24dp"
|
||||
android:theme="@style/DisableableButton" />
|
||||
<ImageButton
|
||||
android:id="@+id/up_button"
|
||||
grid:layout_column="1"
|
||||
grid:layout_row="0"
|
||||
grid:layout_columnWeight="1"
|
||||
grid:layout_rowWeight="1"
|
||||
android:contentDescription="@string/bigscreen_up"
|
||||
android:src="@drawable/ic_arrow_upward_black_24dp"
|
||||
android:theme="@style/DisableableButton" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/select_button"
|
||||
grid:layout_column="1"
|
||||
grid:layout_row="1"
|
||||
grid:layout_columnWeight="1"
|
||||
grid:layout_rowWeight="1"
|
||||
android:contentDescription="@string/bigscreen_select"
|
||||
android:src="@drawable/ic_keyboard_return_black_24dp"
|
||||
android:theme="@style/DisableableButton" />
|
||||
<ImageButton
|
||||
android:id="@+id/mic_button"
|
||||
grid:layout_column="2"
|
||||
grid:layout_columnWeight="1"
|
||||
grid:layout_row="0"
|
||||
grid:layout_rowWeight="1"
|
||||
android:contentDescription="@string/bigscreen_mic"
|
||||
android:src="@drawable/ic_mic_black"
|
||||
android:theme="@style/DisableableButton" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/right_button"
|
||||
grid:layout_column="2"
|
||||
grid:layout_row="1"
|
||||
grid:layout_columnWeight="1"
|
||||
grid:layout_rowWeight="1"
|
||||
android:contentDescription="@string/bigscreen_right"
|
||||
android:src="@drawable/ic_arrow_forward_black_24dp"
|
||||
android:theme="@style/DisableableButton" />
|
||||
<ImageButton
|
||||
android:id="@+id/left_button"
|
||||
grid:layout_column="0"
|
||||
grid:layout_row="1"
|
||||
grid:layout_columnWeight="1"
|
||||
grid:layout_rowWeight="1"
|
||||
android:contentDescription="@string/bigscreen_left"
|
||||
android:src="@drawable/ic_arrow_back_black_24dp"
|
||||
android:theme="@style/DisableableButton" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/down_button"
|
||||
grid:layout_column="1"
|
||||
grid:layout_row="2"
|
||||
grid:layout_columnWeight="1"
|
||||
grid:layout_rowWeight="1"
|
||||
android:contentDescription="@string/bigscreen_down"
|
||||
android:src="@drawable/ic_arrow_downward_black_24dp"
|
||||
android:theme="@style/DisableableButton" />
|
||||
</androidx.gridlayout.widget.GridLayout>
|
||||
<ImageButton
|
||||
android:id="@+id/select_button"
|
||||
grid:layout_column="1"
|
||||
grid:layout_row="1"
|
||||
grid:layout_columnWeight="1"
|
||||
grid:layout_rowWeight="1"
|
||||
android:contentDescription="@string/bigscreen_select"
|
||||
android:src="@drawable/ic_keyboard_return_black_24dp"
|
||||
android:theme="@style/DisableableButton" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/right_button"
|
||||
grid:layout_column="2"
|
||||
grid:layout_row="1"
|
||||
grid:layout_columnWeight="1"
|
||||
grid:layout_rowWeight="1"
|
||||
android:contentDescription="@string/bigscreen_right"
|
||||
android:src="@drawable/ic_arrow_forward_black_24dp"
|
||||
android:theme="@style/DisableableButton" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/down_button"
|
||||
grid:layout_column="1"
|
||||
grid:layout_row="2"
|
||||
grid:layout_columnWeight="1"
|
||||
grid:layout_rowWeight="1"
|
||||
android:contentDescription="@string/bigscreen_down"
|
||||
android:src="@drawable/ic_arrow_downward_black_24dp"
|
||||
android:theme="@style/DisableableButton" />
|
||||
</androidx.gridlayout.widget.GridLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -1,36 +1,46 @@
|
||||
<?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.UserInterface.CustomDevicesActivity">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
<include layout="@layout/toolbar" android:id="@+id/toolbar_layout" />
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:listitem="@layout/custom_device_item"/>
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/emptyListMessage"
|
||||
style="@style/TextAppearance.AppCompat.Medium"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginRight="@dimen/activity_horizontal_margin"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/custom_device_list_help"
|
||||
/>
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:listitem="@layout/custom_device_item"/>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/floatingActionButton"
|
||||
style="@style/KdeConnectThemeBase"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
app:elevation="@dimen/fab_elevation"
|
||||
android:src="@drawable/ic_add"/>
|
||||
<TextView
|
||||
android:id="@+id/emptyListMessage"
|
||||
style="@style/TextAppearance.AppCompat.Medium"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginRight="@dimen/activity_horizontal_margin"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/custom_device_list_help"
|
||||
/>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/floatingActionButton"
|
||||
style="@style/KdeConnectThemeBase"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
app:elevation="@dimen/fab_elevation"
|
||||
android:src="@drawable/ic_add"/>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -119,7 +119,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
android:divider="@drawable/list_divider"
|
||||
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>
|
||||
|
@ -1,23 +1,33 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
<?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"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="org.kde.kdeconnect.Plugins.FindMyPhonePlugin.FindMyPhoneActivity">
|
||||
|
||||
<include layout="@layout/toolbar" android:id="@+id/toolbar_layout" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bFindMyPhone"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:text="@string/findmyphone_found"
|
||||
android:textSize="50sp" />
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<Button
|
||||
android:id="@+id/bFindMyPhone"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:text="@string/findmyphone_found"
|
||||
android:textSize="50sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -12,17 +12,7 @@
|
||||
android:layout_width="match_parent"
|
||||
tools:context="org.kde.kdeconnect.UserInterface.MainActivity">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
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>
|
||||
<include layout="@layout/toolbar" android:id="@+id/toolbar_layout" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/container"
|
||||
@ -37,7 +27,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
app:headerLayout="@layout/nav_header"
|
||||
style="?attr/mainNavigationViewStyle" />
|
||||
app:headerLayout="@layout/nav_header" />
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
@ -1,25 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/mousepad_view"
|
||||
<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"
|
||||
android:keepScreenOn="true"
|
||||
android:orientation="vertical">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="org.kde.kdeconnect.Plugins.MousePadPlugin.MousePadActivity">
|
||||
|
||||
<TextView
|
||||
style="@android:style/TextAppearance.Medium"
|
||||
<include layout="@layout/toolbar" android:id="@+id/toolbar_layout" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/mousepad_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:gravity="center"
|
||||
android:padding="12dip"
|
||||
android:text="@string/mousepad_info" />
|
||||
android:layout_height="match_parent"
|
||||
android:keepScreenOn="true"
|
||||
android:orientation="vertical"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<view
|
||||
android:id="@+id/keyListener"
|
||||
class="org.kde.kdeconnect.Plugins.MousePadPlugin.KeyListenerView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
<TextView
|
||||
style="@android:style/TextAppearance.Medium"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:gravity="center"
|
||||
android:padding="12dip"
|
||||
android:text="@string/mousepad_info" />
|
||||
|
||||
</RelativeLayout>
|
||||
<view
|
||||
android:id="@+id/keyListener"
|
||||
class="org.kde.kdeconnect.Plugins.MousePadPlugin.KeyListenerView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -1,15 +1,17 @@
|
||||
<?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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
tools:context="org.kde.kdeconnect.Plugins.MprisPlugin.MprisActivity">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:elevation="8dp"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
android:theme="@style/ThemeOverlay.AppCompat.ActionBar">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
@ -29,6 +31,7 @@
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/mpris_pager"
|
||||
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,31 +1,45 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
<?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"
|
||||
android:orientation="vertical"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="org.kde.kdeconnect.Plugins.NotificationsPlugin.NotificationFilterActivity">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tFilter"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:text="@string/filter_apps_info" />
|
||||
<include layout="@layout/toolbar" android:id="@+id/toolbar_layout" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/spinner"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="64dip" />
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context="org.kde.kdeconnect.Plugins.NotificationsPlugin.NotificationFilterActivity"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<ListView
|
||||
android:id="@+id/lvFilterApps"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:visibility="gone" />
|
||||
<TextView
|
||||
android:id="@+id/tFilter"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:text="@string/filter_apps_info" />
|
||||
|
||||
</LinearLayout>
|
||||
<ProgressBar
|
||||
android:id="@+id/spinner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="64dip" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/lvFilterApps"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:visibility="gone"
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -1,7 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<FrameLayout
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/fragmentPlaceHolder"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
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.UserInterface.PluginSettingsActivity">
|
||||
|
||||
<include layout="@layout/toolbar" android:id="@+id/toolbar_layout" />
|
||||
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/fragmentPlaceHolder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -1,63 +1,75 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/mpris_control_view"
|
||||
<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"
|
||||
android:padding="12dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@android:style/TextAppearance.Medium"
|
||||
android:id="@+id/textView"
|
||||
android:layout_weight="0"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/presenter_lock_tip" />
|
||||
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:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="1">
|
||||
android:layout_height="match_parent"
|
||||
android:padding="12dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/previous_button"
|
||||
<TextView
|
||||
style="@android:style/TextAppearance.Medium"
|
||||
android:id="@+id/textView"
|
||||
android:layout_weight="0"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:contentDescription="@string/mpris_rew"
|
||||
android:layout_weight="0.25"
|
||||
android:layout_marginRight="3dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:src="@drawable/ic_previous_black"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/presenter_lock_tip" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="1">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/previous_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:contentDescription="@string/mpris_rew"
|
||||
android:layout_weight="0.25"
|
||||
android:layout_marginRight="3dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:src="@drawable/ic_previous_black"
|
||||
android:theme="@style/DisableableButton" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/next_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_weight="0.25"
|
||||
android:contentDescription="@string/mpris_ff"
|
||||
android:src="@drawable/ic_next_black"
|
||||
android:theme="@style/DisableableButton" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/pointer_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.30"
|
||||
android:visibility="gone"
|
||||
android:text="@string/presenter_pointer"
|
||||
android:theme="@style/DisableableButton" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/next_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_weight="0.25"
|
||||
android:contentDescription="@string/mpris_ff"
|
||||
android:src="@drawable/ic_next_black"
|
||||
android:theme="@style/DisableableButton" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/pointer_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.30"
|
||||
android:visibility="gone"
|
||||
android:text="@string/presenter_pointer"
|
||||
android:theme="@style/DisableableButton" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
@ -1,36 +1,49 @@
|
||||
<?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">
|
||||
<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.RunCommandPlugin.RunCommandActivity">
|
||||
|
||||
<ListView
|
||||
android:id="@+id/run_commands_list"
|
||||
<include layout="@layout/toolbar" android:id="@+id/toolbar_layout" />
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="4dp"
|
||||
android:addStatesFromChildren="true"
|
||||
android:orientation="vertical" />
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/add_command_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
android:src="@drawable/ic_action_image_edit_24dp"
|
||||
app:backgroundTint="@color/primary"
|
||||
app:layout_anchor="@id/run_commands_list"
|
||||
app:layout_anchorGravity="bottom|end" />
|
||||
<ListView
|
||||
android:id="@+id/run_commands_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="4dp"
|
||||
android:addStatesFromChildren="true"
|
||||
android:orientation="vertical"
|
||||
android:divider="@null"
|
||||
android:dividerHeight="0dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/add_comand_explanation"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:padding="30dp"
|
||||
android:text="@string/addcommand_explanation"
|
||||
android:textAlignment="center"
|
||||
android:textSize="16sp" />
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/add_command_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
android:src="@drawable/ic_action_image_edit_24dp"
|
||||
app:backgroundTint="@color/primary"
|
||||
app:layout_anchor="@id/run_commands_list"
|
||||
app:layout_anchorGravity="bottom|end" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/add_comand_explanation"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:padding="30dp"
|
||||
android:text="@string/addcommand_explanation"
|
||||
android:textAlignment="center"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</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:dividerHeight="0dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="16dip"
|
||||
android:paddingRight="16dip"
|
||||
tools:context=".MainActivity" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
@ -2,6 +2,7 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@ -9,14 +10,11 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:drawableBottom="@drawable/text_section_header"
|
||||
android:drawablePadding="4dp"
|
||||
android:paddingLeft="8dip"
|
||||
android:paddingRight="8dip"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
android:paddingLeft="16dip"
|
||||
android:paddingRight="16dip"
|
||||
android:textSize="16sp"
|
||||
tools:text="Header" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/list_item_category_empty_placeholder"
|
||||
|
@ -1,36 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="160dp"
|
||||
android:background="@drawable/drawer_header"
|
||||
android:layout_height="@dimen/nav_header_height"
|
||||
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">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/kdeconnect_label"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
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:textColor="#FFF"
|
||||
android:textStyle="bold" />
|
||||
android:layout_width="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/device_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="0dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingEnd="48dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="48dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="4dp"
|
||||
android:text="My device"
|
||||
android:textColor="#fff" />
|
||||
<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>
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/kdeconnect_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/kde_connect"
|
||||
android:textAppearance="?attr/textAppearanceHeadline6" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/device_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?attr/textAppearanceBody2"
|
||||
android:textColor="@color/material_on_surface_emphasis_medium"
|
||||
tools:text="My device" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -1,14 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="false"
|
||||
android:drawableStart="@drawable/ic_warning"
|
||||
android:drawableLeft="@drawable/ic_warning"
|
||||
android:drawablePadding="8dp"
|
||||
android:paddingTop="16dp"
|
||||
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>
|
||||
|
@ -5,6 +5,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:text="@string/pairing_description"
|
||||
android:clickable="false"
|
||||
android:background="@android:color/transparent"
|
||||
|
@ -1,14 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:drawableStart="@drawable/ic_wifi"
|
||||
android:drawableLeft="@drawable/ic_wifi"
|
||||
android:focusable="true"
|
||||
android:drawablePadding="8dp"
|
||||
android:paddingTop="16dp"
|
||||
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>
|
||||
|
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,38 +1,51 @@
|
||||
<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"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin">
|
||||
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" />
|
||||
|
||||
<CheckBox
|
||||
<LinearLayout
|
||||
android:id="@+id/trusted_networks_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<CheckBox
|
||||
android:text="@string/allow_all_networks_text"
|
||||
android:layout_width="match_parent"
|
||||
android:checked="true"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/trust_all_networks_checkBox"/>
|
||||
|
||||
<TextView
|
||||
<TextView
|
||||
android:id="@+id/trusted_network_list_empty"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="100dp"
|
||||
android:text="@string/empty_trusted_networks_list_text"
|
||||
android:gravity="center" />
|
||||
|
||||
<ListView
|
||||
<ListView
|
||||
android:id="@android:id/list"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@android:id/button1"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" />
|
||||
<Button
|
||||
android:id="@android:id/button1"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
@ -11,6 +11,8 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="4dp"
|
||||
android:addStatesFromChildren="true"
|
||||
android:orientation="vertical" />
|
||||
android:orientation="vertical"
|
||||
android:divider="@null"
|
||||
android:dividerHeight="0dp" />
|
||||
|
||||
</LinearLayout>
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="primaryDark">#333333</color>
|
||||
<color name="primaryDark">@android:color/black</color>
|
||||
<color name="darkGrey">#555555</color>
|
||||
<color name="darkToolbarBackground">#222222</color>
|
||||
<color name="darkStatusBarBackground">#333333</color>
|
||||
@ -8,11 +8,13 @@
|
||||
<color name="on_high_contrast">@android:color/white</color>
|
||||
<color name="text_color_primary">@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="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
|
||||
navigation bar should be white. This is different from the light theme as both states have
|
||||
different colors so light theme has a selector for this value-->
|
||||
<color name="state_list_drawer_text">@android:color/white</color>
|
||||
</resources>
|
||||
</resources>
|
||||
|
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>
|
||||
<!-- 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) -->
|
||||
<attr name="colorHighContrast" format="color" />
|
||||
</resources>
|
@ -1,13 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="primary">#F67400</color>
|
||||
<color name="primaryDark">#BD5900</color>
|
||||
<color name="accent">#4ebffa</color>
|
||||
<color name="primaryDark">@android:color/white</color>
|
||||
<color name="accent">#F67400</color>
|
||||
<color name="disabled_grey">#EEEEEE</color>
|
||||
<color name="on_secondary">@android:color/white</color>
|
||||
<color name="on_high_contrast">@android:color/black</color>
|
||||
<color name="text_color_primary">@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="activity_background">@android:color/white</color>
|
||||
<item name="lightMode" type="bool">true</item>
|
||||
</resources>
|
@ -5,4 +5,7 @@
|
||||
<dimen name="key_height">48dip</dimen>
|
||||
<dimen name="fab_margin">16dp</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>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<resources>
|
||||
<!-- 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 three colors used by system widgets, according to https://chris.banes.me/2014/10/17/appcompat-v21/ -->
|
||||
<item name="colorPrimary">@color/primary</item>
|
||||
@ -9,6 +9,8 @@
|
||||
<item name="colorOnSecondary">@color/on_secondary</item>
|
||||
<item name="colorAccent">@color/accent</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) -->
|
||||
<item name="android:textColorPrimary">@color/text_color_primary</item>
|
||||
<item name="android:textColor">@color/text_color</item>
|
||||
@ -18,7 +20,6 @@
|
||||
|
||||
<!-- Style overrides -->
|
||||
<item name="actionModeStyle">@style/ActionModeStyle</item>
|
||||
<item name="mainNavigationViewStyle">@style/MainNavigationView</item>
|
||||
<item name="toolbarStyle">@style/KdeConnectTheme.Toolbar</item>
|
||||
|
||||
<!-- Theme overrides -->
|
||||
|
@ -124,6 +124,24 @@ public class Device implements BaseLink.PacketReceiver {
|
||||
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 {
|
||||
@ -178,21 +196,7 @@ public class Device implements BaseLink.PacketReceiver {
|
||||
}
|
||||
|
||||
public Drawable getIcon() {
|
||||
int drawableId;
|
||||
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);
|
||||
return deviceType.getIcon(context);
|
||||
}
|
||||
|
||||
public DeviceType getDeviceType() {
|
||||
|
@ -25,6 +25,7 @@ import org.kde.kdeconnect_tp.R;
|
||||
import org.kde.kdeconnect_tp.databinding.ActivityBigscreenBinding;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
|
||||
public class BigscreenActivity extends AppCompatActivity {
|
||||
|
||||
@ -38,6 +39,10 @@ public class BigscreenActivity extends AppCompatActivity {
|
||||
final ActivityBigscreenBinding binding = ActivityBigscreenBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
setSupportActionBar(binding.toolbarLayout.toolbar);
|
||||
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||
|
||||
final String deviceId = getIntent().getStringExtra("deviceId");
|
||||
|
||||
if (!SpeechRecognizer.isRecognitionAvailable(this)) {
|
||||
|
@ -11,11 +11,14 @@ import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
|
||||
import org.kde.kdeconnect.BackgroundService;
|
||||
import org.kde.kdeconnect.UserInterface.ThemeUtil;
|
||||
import org.kde.kdeconnect_tp.databinding.ActivityFindMyPhoneBinding;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class FindMyPhoneActivity extends AppCompatActivity {
|
||||
static final String EXTRA_DEVICE_ID = "deviceId";
|
||||
|
||||
@ -29,6 +32,10 @@ public class FindMyPhoneActivity extends AppCompatActivity {
|
||||
final ActivityFindMyPhoneBinding binding = ActivityFindMyPhoneBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
setSupportActionBar(binding.toolbarLayout.toolbar);
|
||||
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||
|
||||
if (!getIntent().hasExtra(EXTRA_DEVICE_ID)) {
|
||||
Log.e("FindMyPhoneActivity", "You must include the deviceId for which this activity is started as an intent EXTRA");
|
||||
finish();
|
||||
|
@ -26,6 +26,8 @@ import org.kde.kdeconnect.BackgroundService;
|
||||
import org.kde.kdeconnect.UserInterface.ThemeUtil;
|
||||
import org.kde.kdeconnect_tp.R;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class MousePadActivity extends AppCompatActivity implements GestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener, MousePadGestureDetector.OnGestureListener {
|
||||
private String deviceId;
|
||||
|
||||
@ -76,6 +78,10 @@ public class MousePadActivity extends AppCompatActivity implements GestureDetect
|
||||
|
||||
setContentView(R.layout.activity_mousepad);
|
||||
|
||||
setSupportActionBar(findViewById(R.id.toolbar));
|
||||
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||
|
||||
deviceId = getIntent().getStringExtra("deviceId");
|
||||
|
||||
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.databinding.ActivityMprisBinding;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class MprisActivity extends AppCompatActivity {
|
||||
|
||||
private ActivityMprisBinding activityMprisBinding;
|
||||
@ -85,7 +87,7 @@ public class MprisActivity extends AppCompatActivity {
|
||||
tabLayoutMediator.attach();
|
||||
|
||||
setSupportActionBar(activityMprisBinding.toolbar);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
||||
static class MprisPagerAdapter extends ExtendedFragmentAdapter {
|
||||
|
@ -34,6 +34,7 @@ import org.kde.kdeconnect_tp.databinding.ActivityNotificationFilterBinding;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
//TODO: Turn this into a PluginSettingsFragment
|
||||
public class NotificationFilterActivity extends AppCompatActivity {
|
||||
@ -96,6 +97,10 @@ public class NotificationFilterActivity extends AppCompatActivity {
|
||||
setContentView(binding.getRoot());
|
||||
appDatabase = new AppDatabase(NotificationFilterActivity.this, false);
|
||||
|
||||
setSupportActionBar(binding.toolbarLayout.toolbar);
|
||||
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||
|
||||
new Thread(() -> {
|
||||
PackageManager packageManager = getPackageManager();
|
||||
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.databinding.ActivityPresenterBinding;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class PresenterActivity extends AppCompatActivity implements SensorEventListener {
|
||||
private ActivityPresenterBinding binding;
|
||||
|
||||
@ -86,6 +88,10 @@ public class PresenterActivity extends AppCompatActivity implements SensorEventL
|
||||
binding = ActivityPresenterBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
setSupportActionBar(binding.toolbarLayout.toolbar);
|
||||
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||
|
||||
final String deviceId = getIntent().getStringExtra("deviceId");
|
||||
|
||||
BackgroundService.RunWithPlugin(this, deviceId, PresenterPlugin.class, plugin -> runOnUiThread(() -> {
|
||||
|
@ -35,6 +35,7 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class RunCommandActivity extends AppCompatActivity {
|
||||
private ActivityRunCommandBinding binding;
|
||||
@ -81,6 +82,10 @@ public class RunCommandActivity extends AppCompatActivity {
|
||||
binding = ActivityRunCommandBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
setSupportActionBar(binding.toolbarLayout.toolbar);
|
||||
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||
|
||||
deviceId = getIntent().getStringExtra("deviceId");
|
||||
|
||||
boolean canAddCommands = false;
|
||||
|
@ -17,19 +17,20 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import org.kde.kdeconnect.BackgroundService;
|
||||
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.SectionItem;
|
||||
import org.kde.kdeconnect.UserInterface.ThemeUtil;
|
||||
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.Collection;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
public class ShareActivity extends AppCompatActivity {
|
||||
private DevicesListBinding binding;
|
||||
private ActivityShareBinding binding;
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
@ -54,13 +55,13 @@ public class ShareActivity extends AppCompatActivity {
|
||||
updateComputerList();
|
||||
BackgroundService.RunCommand(ShareActivity.this, BackgroundService::onNetworkChange);
|
||||
|
||||
binding.refreshListLayout.setRefreshing(true);
|
||||
binding.devicesListLayout.refreshListLayout.setRefreshing(true);
|
||||
new Thread(() -> {
|
||||
try {
|
||||
Thread.sleep(1500);
|
||||
} catch (InterruptedException ignored) {
|
||||
}
|
||||
runOnUiThread(() -> binding.refreshListLayout.setRefreshing(false));
|
||||
runOnUiThread(() -> binding.devicesListLayout.refreshListLayout.setRefreshing(false));
|
||||
}).start();
|
||||
}
|
||||
|
||||
@ -85,14 +86,14 @@ public class ShareActivity extends AppCompatActivity {
|
||||
for (Device d : devices) {
|
||||
if (d.isReachable() && d.isPaired()) {
|
||||
devicesList.add(d);
|
||||
items.add(new EntryItem(d.getName()));
|
||||
items.add(new EntryItemWithIcon(d.getName(), d.getIcon()));
|
||||
section.isEmpty = false;
|
||||
}
|
||||
}
|
||||
|
||||
runOnUiThread(() -> {
|
||||
binding.devicesList.setAdapter(new ListAdapter(ShareActivity.this, items));
|
||||
binding.devicesList.setOnItemClickListener((adapterView, view, i, l) -> {
|
||||
binding.devicesListLayout.devicesList.setAdapter(new ListAdapter(ShareActivity.this, items));
|
||||
binding.devicesListLayout.devicesList.setOnItemClickListener((adapterView, view, i, l) -> {
|
||||
Device device = devicesList.get(i - 1); //NOTE: -1 because of the title!
|
||||
BackgroundService.RunWithPlugin(this, device.getDeviceId(), SharePlugin.class, plugin -> plugin.share(intent));
|
||||
finish();
|
||||
@ -106,11 +107,15 @@ public class ShareActivity extends AppCompatActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
ThemeUtil.setUserPreferredTheme(this);
|
||||
|
||||
binding = DevicesListBinding.inflate(getLayoutInflater());
|
||||
binding = ActivityShareBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
||||
setSupportActionBar(binding.toolbarLayout.toolbar);
|
||||
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
binding.refreshListLayout.setOnRefreshListener(this::updateComputerListAction);
|
||||
binding.devicesListLayout.refreshListLayout.setOnRefreshListener(this::updateComputerListAction);
|
||||
if (actionBar != null) {
|
||||
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.Collections;
|
||||
import java.util.Objects;
|
||||
|
||||
//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
|
||||
@ -63,6 +64,10 @@ public class CustomDevicesActivity extends AppCompatActivity implements CustomDe
|
||||
emptyListMessage = binding.emptyListMessage;
|
||||
final FloatingActionButton fab = binding.floatingActionButton;
|
||||
|
||||
setSupportActionBar(binding.toolbarLayout.toolbar);
|
||||
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||
|
||||
fab.setOnClickListener(v -> showEditTextDialog(""));
|
||||
|
||||
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.SubMenu;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@ -81,12 +82,12 @@ public class MainActivity extends AppCompatActivity implements SharedPreferences
|
||||
|
||||
mNavigationView = binding.navigationDrawer;
|
||||
mDrawerLayout = binding.drawerLayout;
|
||||
final Toolbar mToolbar = binding.toolbar;
|
||||
|
||||
View mDrawerHeader = mNavigationView.getHeaderView(0);
|
||||
mNavViewDeviceName = mDrawerHeader.findViewById(R.id.device_name);
|
||||
ImageView mNavViewDeviceType = mDrawerHeader.findViewById(R.id.device_type);
|
||||
|
||||
setSupportActionBar(mToolbar);
|
||||
setSupportActionBar(binding.toolbarLayout.toolbar);
|
||||
|
||||
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
|
||||
PreferenceManager.getDefaultSharedPreferences(this).registerOnSharedPreferenceChangeListener(this);
|
||||
String deviceName = DeviceHelper.getDeviceName(this);
|
||||
mNavViewDeviceType.setImageDrawable(DeviceHelper.getDeviceType(this).getIcon(this));
|
||||
mNavViewDeviceName.setText(deviceName);
|
||||
|
||||
mNavigationView.setNavigationItemSelectedListener(menuItem -> {
|
||||
|
@ -18,6 +18,8 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class PluginSettingsActivity
|
||||
extends AppCompatActivity
|
||||
implements PluginPreference.PluginPreferenceCallback {
|
||||
@ -35,9 +37,9 @@ public class PluginSettingsActivity
|
||||
|
||||
setContentView(R.layout.activity_plugin_settings);
|
||||
|
||||
if (getSupportActionBar() != null) {
|
||||
getSupportActionBar().setDefaultDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
setSupportActionBar(findViewById(R.id.toolbar));
|
||||
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||
|
||||
String pluginKey = null;
|
||||
|
||||
|
@ -22,6 +22,7 @@ import org.kde.kdeconnect_tp.databinding.TrustedNetworkListBinding;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class TrustedNetworksActivity extends AppCompatActivity {
|
||||
private TrustedNetworkListBinding binding;
|
||||
@ -48,6 +49,10 @@ public class TrustedNetworksActivity extends AppCompatActivity {
|
||||
setContentView(binding.getRoot());
|
||||
trustedNetworksView = binding.list;
|
||||
|
||||
setSupportActionBar(binding.toolbarLayout.toolbar);
|
||||
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setDisplayShowHomeEnabled(true);
|
||||
|
||||
trustedNetworkHelper = new TrustedNetworkHelper(getApplicationContext());
|
||||
trustedNetworks = new ArrayList<>();
|
||||
Collections.addAll(trustedNetworks, trustedNetworkHelper.read());
|
||||
|
Loading…
x
Reference in New Issue
Block a user