mirror of
https://github.com/readrops/Readrops.git
synced 2025-02-03 12:07:35 +01:00
Add notification permission activity
This commit is contained in:
parent
4762828980
commit
c4848fc7c6
@ -29,6 +29,10 @@
|
||||
android:resource="@xml/file_paths" />
|
||||
</provider>
|
||||
|
||||
<activity
|
||||
android:name=".activities.NotificationPermissionActivity"
|
||||
android:theme="@style/AppTheme" />
|
||||
|
||||
<activity
|
||||
android:name=".activities.WebViewActivity"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
@ -44,6 +48,7 @@
|
||||
android:theme="@style/SplashTheme">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
@ -71,11 +76,12 @@
|
||||
android:parentActivityName=".activities.MainActivity">
|
||||
<intent-filter android:label="@string/new_feed">
|
||||
<action android:name="android.intent.action.SEND" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
<data android:mimeType="text/plain" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -0,0 +1,21 @@
|
||||
package com.readrops.app.activities
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.readrops.app.R
|
||||
import com.readrops.app.adapters.NotificationPermissionAdapter
|
||||
import com.readrops.app.databinding.ActivityNotificationPermissionBinding
|
||||
|
||||
class NotificationPermissionActivity : AppCompatActivity() {
|
||||
|
||||
lateinit var binding: ActivityNotificationPermissionBinding
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
binding = DataBindingUtil.setContentView(this, R.layout.activity_notification_permission)
|
||||
|
||||
binding.notifPermissionAccountList.layoutManager = LinearLayoutManager(this)
|
||||
}
|
||||
}
|
52
app/src/main/res/layout/activity_notification_permission.xml
Normal file
52
app/src/main/res/layout/activity_notification_permission.xml
Normal file
@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="com.readrops.app.activities.NotificationPermissionActivity">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/notif_permission_account_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/notif_permission_account"
|
||||
style="@style/TextAppearance.AppCompat.Subhead"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_toStartOf="@id/notif_permission_account_switch"
|
||||
android:text="@string/enable_notifications" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/notif_permission_account_switch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/notif_permission_account_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/notif_permission_account_layout" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</layout>
|
@ -123,5 +123,6 @@
|
||||
<string name="every_day">Chaque jour</string>
|
||||
<string name="account_synchro">Synchronisation des comptes</string>
|
||||
<string name="new_items">%1$s nouveaux articles</string>
|
||||
<string name="enable_notifications">Activer les notifications</string>
|
||||
|
||||
</resources>
|
@ -129,4 +129,5 @@
|
||||
<string name="every_day">Every day</string>
|
||||
<string name="account_synchro">Accounts synchronisation</string>
|
||||
<string name="new_items">%1$s new articles</string>
|
||||
<string name="enable_notifications">Enable notifications</string>
|
||||
</resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user