mirror of
https://github.com/IllusionMan1212/NPS-Browser.git
synced 2026-10-24 02:12:37 +00:00
move mainactivity to root package
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
android:theme="@style/NPSTheme"
|
android:theme="@style/NPSTheme"
|
||||||
android:usesCleartextTraffic="true">
|
android:usesCleartextTraffic="true">
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.MainActivity"
|
android:name=".MainActivity"
|
||||||
android:configChanges="screenSize|screenLayout|keyboardHidden|orientation"
|
android:configChanges="screenSize|screenLayout|keyboardHidden|orientation"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:theme="@style/NPSTheme.Splash"
|
android:theme="@style/NPSTheme.Splash"
|
||||||
|
|||||||
+20
-9
@@ -1,4 +1,4 @@
|
|||||||
package com.illusionware.npsbrowser.activities
|
package com.illusionware.npsbrowser
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.activity.ComponentActivity
|
import androidx.activity.ComponentActivity
|
||||||
@@ -28,6 +28,7 @@ import androidx.compose.foundation.shape.RoundedCornerShape
|
|||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.ArrowBack
|
import androidx.compose.material.icons.filled.ArrowBack
|
||||||
import androidx.compose.material.icons.filled.Close
|
import androidx.compose.material.icons.filled.Close
|
||||||
|
import androidx.compose.material.icons.filled.Downloading
|
||||||
import androidx.compose.material.icons.filled.GridView
|
import androidx.compose.material.icons.filled.GridView
|
||||||
import androidx.compose.material.icons.filled.Search
|
import androidx.compose.material.icons.filled.Search
|
||||||
import androidx.compose.material.icons.filled.Settings
|
import androidx.compose.material.icons.filled.Settings
|
||||||
@@ -84,8 +85,6 @@ import androidx.navigation.compose.rememberNavController
|
|||||||
import coil.compose.AsyncImage
|
import coil.compose.AsyncImage
|
||||||
import coil.request.ImageRequest
|
import coil.request.ImageRequest
|
||||||
import com.google.accompanist.systemuicontroller.rememberSystemUiController
|
import com.google.accompanist.systemuicontroller.rememberSystemUiController
|
||||||
import com.illusionware.npsbrowser.R
|
|
||||||
import com.illusionware.npsbrowser.Routes
|
|
||||||
import com.illusionware.npsbrowser.data.ItemLayout
|
import com.illusionware.npsbrowser.data.ItemLayout
|
||||||
import com.illusionware.npsbrowser.data.SettingsPreferences
|
import com.illusionware.npsbrowser.data.SettingsPreferences
|
||||||
import com.illusionware.npsbrowser.model.ConsoleType
|
import com.illusionware.npsbrowser.model.ConsoleType
|
||||||
@@ -283,17 +282,29 @@ fun HomePage(
|
|||||||
tooltip = stringResource(id = R.string.layout),
|
tooltip = stringResource(id = R.string.layout),
|
||||||
onClick = { layoutDialogOpen = true }
|
onClick = { layoutDialogOpen = true }
|
||||||
) {
|
) {
|
||||||
Icon(imageVector = if (settingsPrefs.layout == ItemLayout.GRID.ordinal) Icons.Filled.GridView else Icons.Filled.ViewList, contentDescription = stringResource(
|
Icon(
|
||||||
id = R.string.layout
|
imageVector = if (settingsPrefs.layout == ItemLayout.GRID.ordinal) Icons.Filled.GridView else Icons.Filled.ViewList,
|
||||||
))
|
contentDescription = stringResource(
|
||||||
|
id = R.string.layout
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
NPSIconButton(
|
||||||
|
tooltip = "Download queue",
|
||||||
|
onClick = { /*TODO*/ }
|
||||||
|
) {
|
||||||
|
Icon(imageVector = Icons.Filled.Downloading, contentDescription = "Download queue")
|
||||||
}
|
}
|
||||||
NPSIconButton(
|
NPSIconButton(
|
||||||
tooltip = stringResource(id = R.string.title_activity_settings),
|
tooltip = stringResource(id = R.string.title_activity_settings),
|
||||||
onClick = { navigateToSettings() }
|
onClick = { navigateToSettings() }
|
||||||
){
|
){
|
||||||
Icon(imageVector = Icons.Filled.Settings, contentDescription = stringResource(
|
Icon(
|
||||||
id = R.string.title_activity_settings
|
imageVector = Icons.Filled.Settings,
|
||||||
))
|
contentDescription = stringResource(
|
||||||
|
id = R.string.title_activity_settings
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -64,7 +64,7 @@ import androidx.lifecycle.viewmodel.compose.viewModel
|
|||||||
import coil.compose.AsyncImage
|
import coil.compose.AsyncImage
|
||||||
import coil.request.ImageRequest
|
import coil.request.ImageRequest
|
||||||
import com.illusionware.npsbrowser.R
|
import com.illusionware.npsbrowser.R
|
||||||
import com.illusionware.npsbrowser.activities.PlaceholderColor
|
import com.illusionware.npsbrowser.PlaceholderColor
|
||||||
import com.illusionware.npsbrowser.data.ItemLayout
|
import com.illusionware.npsbrowser.data.ItemLayout
|
||||||
import com.illusionware.npsbrowser.data.SettingsPreferences
|
import com.illusionware.npsbrowser.data.SettingsPreferences
|
||||||
import com.illusionware.npsbrowser.data.Theme
|
import com.illusionware.npsbrowser.data.Theme
|
||||||
|
|||||||
@@ -24,7 +24,9 @@ import androidx.compose.foundation.rememberScrollState
|
|||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.ArrowBack
|
import androidx.compose.material.icons.filled.ArrowBack
|
||||||
|
import androidx.compose.material.icons.filled.Check
|
||||||
import androidx.compose.material.icons.outlined.ArrowDropDown
|
import androidx.compose.material.icons.outlined.ArrowDropDown
|
||||||
|
import androidx.compose.material.icons.outlined.ExpandMore
|
||||||
import androidx.compose.material.icons.outlined.FileDownload
|
import androidx.compose.material.icons.outlined.FileDownload
|
||||||
import androidx.compose.material.icons.outlined.Palette
|
import androidx.compose.material.icons.outlined.Palette
|
||||||
import androidx.compose.material.icons.outlined.Unarchive
|
import androidx.compose.material.icons.outlined.Unarchive
|
||||||
@@ -44,6 +46,7 @@ import androidx.compose.runtime.setValue
|
|||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.draw.alpha
|
import androidx.compose.ui.draw.alpha
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.graphics.painter.Painter
|
import androidx.compose.ui.graphics.painter.Painter
|
||||||
import androidx.compose.ui.graphics.vector.ImageVector
|
import androidx.compose.ui.graphics.vector.ImageVector
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
@@ -116,7 +119,6 @@ fun SettingsScreen(
|
|||||||
Pkg2Zip(viewModel, prefs)
|
Pkg2Zip(viewModel, prefs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,7 +186,7 @@ fun TsvFiles(viewModel: SettingsViewModel, prefs: SettingsPreferences) {
|
|||||||
DialogSetting(
|
DialogSetting(
|
||||||
title = "Expand",
|
title = "Expand",
|
||||||
value = "PS3 DLC, PSP Games, PSP DLC, PSX Games, PSM Games",
|
value = "PS3 DLC, PSP Games, PSP DLC, PSX Games, PSM Games",
|
||||||
icon = Icons.Outlined.ArrowDropDown,
|
icon = Icons.Outlined.ExpandMore,
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
onClick = { expanded = true },
|
onClick = { expanded = true },
|
||||||
)
|
)
|
||||||
@@ -515,7 +517,19 @@ fun ToggleSetting(title: String, icon: ImageVector? = null, checked: Boolean, on
|
|||||||
Box(modifier = Modifier.width(56.dp))
|
Box(modifier = Modifier.width(56.dp))
|
||||||
}
|
}
|
||||||
Text(text = title, color = MaterialTheme.colorScheme.onBackground, modifier = Modifier.weight(1.0f))
|
Text(text = title, color = MaterialTheme.colorScheme.onBackground, modifier = Modifier.weight(1.0f))
|
||||||
Switch(checked = checked, onCheckedChange = null)
|
Switch(
|
||||||
|
checked = checked,
|
||||||
|
onCheckedChange = null,
|
||||||
|
thumbContent = if (checked) {
|
||||||
|
{
|
||||||
|
Icon(
|
||||||
|
imageVector = Icons.Default.Check,
|
||||||
|
contentDescription = null,
|
||||||
|
modifier = Modifier.size(16.dp)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
} else null
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user