This commit is contained in:
tom5079
2021-09-16 23:04:32 +09:00
parent 0a1e0a2dcf
commit 9ef7852bab
5 changed files with 15 additions and 43 deletions

1
.idea/gradle.xml generated
View File

@@ -7,7 +7,6 @@
<option name="testRunner" value="GRADLE" /> <option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" /> <option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="JDK" />
<option name="modules"> <option name="modules">
<set> <set>
<option value="$PROJECT_DIR$" /> <option value="$PROJECT_DIR$" />

34
.idea/misc.xml generated
View File

@@ -1,38 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="DesignSurface"> <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<option name="filePathToZoomLevelMap">
<map>
<entry key="../../../../layout/compose-model-1627195341053.xml" value="0.33" />
<entry key="../../../../layout/compose-model-1627257664594.xml" value="0.4518581081081081" />
<entry key="../../../../layout/compose-model-1627353146836.xml" value="0.5" />
<entry key="../../../../layout/compose-model-1627359089674.xml" value="0.67" />
<entry key="../../../../layout/compose-model-1627469604886.xml" value="0.3684210526315789" />
<entry key="../../../../layout/compose-model-1627528986080.xml" value="0.13723644578313254" />
<entry key="../../../../layout/compose-model-1627529731737.xml" value="0.18919427710843373" />
<entry key="../../../../layout/compose-model-1627530302667.xml" value="0.1" />
<entry key="../../../../layout/compose-model-1627605645856.xml" value="0.25" />
<entry key="../../../../layout/compose-model-1627688771576.xml" value="0.3023525994772001" />
<entry key="../../../../layout/compose-model-1627721024779.xml" value="0.3020621550972989" />
<entry key="../../../../layout/compose-model-1628033383820.xml" value="0.23796296296296296" />
<entry key="../../../../layout/compose-model-1628120781047.xml" value="0.28405460354342144" />
<entry key="../../../../layout/compose-model-1628214547556.xml" value="0.2939297124600639" />
<entry key="../../../../layout/compose-model-1628301117560.xml" value="0.18711713384072767" />
<entry key="../../../../layout/compose-model-1628301166312.xml" value="0.19250046408019306" />
<entry key="../../../../layout/compose-model-1628490334478.xml" value="0.1212177464265825" />
<entry key="../../../../layout/compose-model-1628898655628.xml" value="0.19300204727340406" />
<entry key="../../../../layout/compose-model-1628898937985.xml" value="0.19300204727340406" />
<entry key="../../../../layout/compose-model-1631666404391.xml" value="0.36203703703703705" />
<entry key="../../../../layout/custom_preview.xml" value="0.518974358974359" />
<entry key="app/src/main/res/drawable/avd_star.xml" value="0.2722222222222222" />
<entry key="app/src/main/res/layout/main_activity.xml" value="0.2953125" />
<entry key="app/src/main/res/layout/main_activity_content.xml" value="0.2953125" />
<entry key="app/src/main/res/layout/progress_card_view.xml" value="0.2953125" />
<entry key="app/src/main/res/layout/search_result_item.xml" value="0.2489868287740628" />
</map>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="Android Studio default JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" /> <output url="file://$PROJECT_DIR$/build/classes" />
</component> </component>
<component name="ProjectType"> <component name="ProjectType">

View File

@@ -11,11 +11,11 @@ plugins {
} }
android { android {
compileSdk = 30 compileSdk = 31
defaultConfig { defaultConfig {
applicationId = "xyz.quaver.pupil" applicationId = "xyz.quaver.pupil"
minSdk = 21 minSdk = 21
targetSdk = 30 targetSdk = 31
versionCode = 600 versionCode = 600
versionName = "6.0.0-alpha2" versionName = "6.0.0-alpha2"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
@@ -74,6 +74,7 @@ dependencies {
implementation("androidx.compose.runtime:runtime-livedata:1.0.2") implementation("androidx.compose.runtime:runtime-livedata:1.0.2")
implementation("androidx.compose.material:material-icons-extended:1.0.2") implementation("androidx.compose.material:material-icons-extended:1.0.2")
implementation("androidx.activity:activity-compose:1.3.1") implementation("androidx.activity:activity-compose:1.3.1")
implementation("androidx.navigation:navigation-compose:2.4.0-alpha08")
implementation("com.google.accompanist:accompanist-flowlayout:0.16.1") implementation("com.google.accompanist:accompanist-flowlayout:0.16.1")
implementation("com.google.accompanist:accompanist-appcompat-theme:0.16.0") implementation("com.google.accompanist:accompanist-appcompat-theme:0.16.0")

View File

@@ -54,7 +54,8 @@
<activity <activity
android:name=".ui.ReaderActivity" android:name=".ui.ReaderActivity"
android:configChanges="keyboardHidden|orientation|screenSize" android:configChanges="keyboardHidden|orientation|screenSize"
android:parentActivityName=".ui.MainActivity"> android:parentActivityName=".ui.MainActivity"
android:exported="true">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
@@ -218,7 +219,8 @@
<activity <activity
android:name=".ui.MainActivity" android:name=".ui.MainActivity"
android:configChanges="keyboardHidden|orientation|screenSize" android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/NoActionBarAppTheme"> android:theme="@style/NoActionBarAppTheme"
android:exported="true">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />

View File

@@ -21,8 +21,10 @@ package xyz.quaver.pupil.ui
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.view.* import android.view.*
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent import androidx.activity.compose.setContent
import androidx.activity.viewModels import androidx.activity.viewModels
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Scaffold import androidx.compose.material.Scaffold
import androidx.compose.material.TopAppBar import androidx.compose.material.TopAppBar
import androidx.compose.material.Text import androidx.compose.material.Text
@@ -33,12 +35,12 @@ import org.kodein.di.android.closestDI
import xyz.quaver.pupil.databinding.ReaderActivityBinding import xyz.quaver.pupil.databinding.ReaderActivityBinding
import xyz.quaver.pupil.ui.viewmodel.ReaderViewModel import xyz.quaver.pupil.ui.viewmodel.ReaderViewModel
class ReaderActivity : BaseActivity(), DIAware { class ReaderActivity : ComponentActivity(), DIAware {
override val di by closestDI() override val di by closestDI()
private var menu: Menu? = null private var menu: Menu? = null
private lateinit var binding: ReaderActivityBinding private lateinit var bindiddng: ReaderActivityBinding
private val model: ReaderViewModel by viewModels() private val model: ReaderViewModel by viewModels()
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
@@ -48,9 +50,9 @@ class ReaderActivity : BaseActivity(), DIAware {
AppCompatTheme { AppCompatTheme {
Scaffold( Scaffold(
topBar = { topBar = {
TopAppBar() { TopAppBar(
Text("Reader") title = { Text("Reader", color = MaterialTheme.colors.onSecondary) }
} )
} }
) { ) {