Skip to content

Commit

Permalink
Merge pull request #74 from angrezichatterbox/Use-Fragments-For-Navig…
Browse files Browse the repository at this point in the history
…ation

feat:Use Fragments for navigation
  • Loading branch information
andrewtavis authored Aug 30, 2024
2 parents e5c8d72 + a6d90b5 commit a41cbb9
Show file tree
Hide file tree
Showing 39 changed files with 962 additions and 1,102 deletions.
Empty file removed app/CustomAdapter.kt
Empty file.
3 changes: 3 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ android {
dependencies {
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.activity:activity-ktx:1.9.1'
implementation 'androidx.navigation:navigation-fragment-ktx:2.7.7'
implementation 'androidx.navigation:navigation-ui-ktx:2.7.7'
kapt 'androidx.room:room-compiler:2.6.1'
implementation 'androidx.room:room-runtime:2.6.1'
annotationProcessor 'androidx.room:room-compiler:2.6.1'
Expand All @@ -86,6 +88,7 @@ dependencies {
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'androidx.cardview:cardview:1.0.0'
implementation "androidx.viewpager2:viewpager2:1.0.0"

api 'joda-time:joda-time:2.10.13'
api 'com.github.tibbi:RecyclerView-FastScroller:e7d3e150c4'
Expand Down
49 changes: 29 additions & 20 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:installLocation="auto">
android:installLocation="auto" >

<uses-permission
android:name="android.permission.USE_FINGERPRINT"
tools:node="remove" />
Expand All @@ -19,6 +20,14 @@
android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".activities.MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity
android:name=".activities.SplashActivity"
android:exported="false"
Expand All @@ -30,7 +39,7 @@
android:exported="true"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher"
android:targetActivity=".activities.SplashActivity">
android:targetActivity=".activities.SplashActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand All @@ -39,14 +48,14 @@
</activity-alias>

<activity
android:name=".activities.MainActivity"
android:name=".fragments.MainFragment"
android:exported="false" />

<service
android:name=".services.EnglishKeyboardIME"
android:exported="true"
android:label="Scribe"
android:permission="android.permission.BIND_INPUT_METHOD">
android:permission="android.permission.BIND_INPUT_METHOD" >
<intent-filter>
<action android:name="android.view.InputMethod" />
</intent-filter>
Expand All @@ -59,7 +68,7 @@
android:name=".services.GermanKeyboardIME"
android:exported="true"
android:label="Scribe"
android:permission="android.permission.BIND_INPUT_METHOD">
android:permission="android.permission.BIND_INPUT_METHOD" >
<intent-filter>
<action android:name="android.view.InputMethod" />
</intent-filter>
Expand All @@ -72,7 +81,7 @@
android:name=".services.FrenchKeyboardIME"
android:exported="true"
android:label="Scribe"
android:permission="android.permission.BIND_INPUT_METHOD">
android:permission="android.permission.BIND_INPUT_METHOD" >
<intent-filter>
<action android:name="android.view.InputMethod" />
</intent-filter>
Expand All @@ -85,7 +94,7 @@
android:name=".services.ItalianKeyboardIME"
android:exported="true"
android:label="Scribe"
android:permission="android.permission.BIND_INPUT_METHOD">
android:permission="android.permission.BIND_INPUT_METHOD" >
<intent-filter>
<action android:name="android.view.InputMethod" />
</intent-filter>
Expand All @@ -98,7 +107,7 @@
android:name=".services.PortugueseKeyboardIME"
android:exported="true"
android:label="Scribe"
android:permission="android.permission.BIND_INPUT_METHOD">
android:permission="android.permission.BIND_INPUT_METHOD" >
<intent-filter>
<action android:name="android.view.InputMethod" />
</intent-filter>
Expand All @@ -111,7 +120,7 @@
android:name=".services.RussianKeyboardIME"
android:exported="true"
android:label="Scribe"
android:permission="android.permission.BIND_INPUT_METHOD">
android:permission="android.permission.BIND_INPUT_METHOD" >
<intent-filter>
<action android:name="android.view.InputMethod" />
</intent-filter>
Expand All @@ -124,7 +133,7 @@
android:name=".services.SpanishKeyboardIME"
android:exported="true"
android:label="Scribe"
android:permission="android.permission.BIND_INPUT_METHOD">
android:permission="android.permission.BIND_INPUT_METHOD" >
<intent-filter>
<action android:name="android.view.InputMethod" />
</intent-filter>
Expand All @@ -137,7 +146,7 @@
android:name=".services.SwedishKeyboardIME"
android:exported="true"
android:label="Scribe"
android:permission="android.permission.BIND_INPUT_METHOD">
android:permission="android.permission.BIND_INPUT_METHOD" >
<intent-filter>
<action android:name="android.view.InputMethod" />
</intent-filter>
Expand All @@ -148,10 +157,10 @@
</service>

<activity
android:name=".activities.SettingsActivity"
android:name=".fragments.SettingsFragment"
android:exported="true"
android:label="@string/app.settings.title"
android:parentActivityName=".activities.MainActivity">
android:parentActivityName=".fragments.MainFragment" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
Expand All @@ -162,25 +171,25 @@
</intent-filter>
</activity>
<activity
android:name=".activities.AboutActivity"
android:name=".fragments.AboutFragment"
android:label="@string/app.about.title"
android:parentActivityName=".activities.MainActivity" />
android:parentActivityName=".fragments.MainFragment" />
<activity
android:name=".activities.WikimediaScribeActivity"
android:name=".fragments.WikimediaScribeFragment"
android:label="@string/app.about.wikimedia"
android:parentActivityName=".activities.MainActivity" />
android:parentActivityName=".fragments.MainFragment" />
<activity
android:name=".activities.PrivacyPolicyActivity"
android:name=".fragments.PrivacyPolicyFragment"
android:label="@string/app.about.privacyPolicy"
android:parentActivityName=".activities.MainActivity" />
<activity
android:name=".activities.ThirdPartyActivity"
android:name=".fragments.ThirdPartyFragment"
android:label="@string/app.about.thirdParty"
android:parentActivityName=".activities.MainActivity" />
<activity
android:name=".activities.LanguageSettings"
android:label="Language Settings"
android:parentActivityName=".activities.MainActivity" />
android:parentActivityName=".fragments.MainFragment" />
</application>

</manifest>
6 changes: 6 additions & 0 deletions app/src/main/java/be/scri/App.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
package be.scri

import android.app.Application
import androidx.appcompat.app.AppCompatDelegate
import be.scri.extensions.checkUseEnglish
import be.scri.extensions.config

class App : Application() {
override fun onCreate() {
AppCompatDelegate.setDefaultNightMode(
if (config.darkTheme) AppCompatDelegate.MODE_NIGHT_YES
else AppCompatDelegate.MODE_NIGHT_NO
)
super.onCreate()
checkUseEnglish()
}
Expand Down
198 changes: 0 additions & 198 deletions app/src/main/java/be/scri/activities/AboutActivity.kt

This file was deleted.

Loading

0 comments on commit a41cbb9

Please sign in to comment.