diff --git a/.idea/misc.xml b/.idea/misc.xml index 8de1e05005ee4b57ed32e8fe3389ca81be8ba418..e07a48feb38bbb21ca2b34aa49a5a3842b146a93 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -43,6 +43,7 @@ <entry key="../../../../layout/compose-model-1640171994534.xml" value="0.1" /> <entry key="../../../../layout/compose-model-1640172762520.xml" value="0.1" /> <entry key="../../../../layout/compose-model-1640173242456.xml" value="0.1" /> + <entry key="../../../../layout/compose-model-1640252474731.xml" value="0.41807432432432434" /> <entry key="app/src/main/res/layout/activity_create_character.xml" value="0.16510416666666666" /> <entry key="app/src/main/res/layout/activity_main.xml" value="0.16510416666666666" /> <entry key="app/src/main/res/layout/activity_profile.xml" value="0.165" /> diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 2ca54a6b0b059744ece2e94f56730e8d00040c39..b7277aee65d336f8e735e691ad82db1c0215c8de 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -13,6 +13,17 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/Theme.DndSpells"> + <activity + android:name=".CharacterListActivity" + android:exported="true" + android:label="@string/title_activity_character_list" + android:theme="@style/Theme.DndSpells.NoActionBar"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> <activity android:name=".SelectSpellsActivity" android:exported="false" diff --git a/app/src/main/java/com/flyinpancake/dndspells/CharacterListActivity.kt b/app/src/main/java/com/flyinpancake/dndspells/CharacterListActivity.kt new file mode 100644 index 0000000000000000000000000000000000000000..49255aaa206c4955078e3dc5323761b531e23877 --- /dev/null +++ b/app/src/main/java/com/flyinpancake/dndspells/CharacterListActivity.kt @@ -0,0 +1,46 @@ +package com.flyinpancake.dndspells + +import android.os.Bundle +import androidx.activity.ComponentActivity +import androidx.activity.compose.setContent +import androidx.compose.material.* +import androidx.compose.runtime.Composable +import androidx.compose.ui.tooling.preview.Preview +import com.flyinpancake.dndspells.ui.components.DndTopBar +import com.flyinpancake.dndspells.ui.theme.DndSpellsTheme + +class CharacterListActivity : ComponentActivity() { + @OptIn(ExperimentalMaterialApi::class) + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContent { + DndSpellsTheme { + // A surface container using the 'background' color from the theme + Surface(color = MaterialTheme.colors.background) { + BackdropScaffold(appBar = { + DndTopBar("D&D Spellbook - Select a character") + }, backLayerContent = { + Greeting("Android") + }, frontLayerContent = { + Greeting("Android") + }) { + } + + } + } + } + } +} + +@Composable +fun Greeting(name: String) { + Text(text = "Hello $name!") +} + +@Preview(showBackground = true) +@Composable +fun DefaultPreview() { + DndSpellsTheme { + Greeting("Android") + } +} \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ef08bb79d779b3b63558f628b96f91ce854abe84..fdeb6f35a66cfd962b630023c68939460265c52d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -24,4 +24,5 @@ <string name="filter_spell_level">Filter Spell Level</string> <string name="spell_name">Spell Name</string> <string name="you_rolled">You rolled:</string> + <string name="title_activity_character_list">CharacterListActivity</string> </resources> \ No newline at end of file