Skip to content

Commit

Permalink
Component names & icons
Browse files Browse the repository at this point in the history
Also scaled nav icons to match
  • Loading branch information
boswelja committed Nov 14, 2024
1 parent f0e948d commit 54e8345
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ import com.imashnake.animite.features.theme.AnimiteTheme
import com.imashnake.animite.profile.Profile
import com.imashnake.animite.profile.ProfileScreen
import com.imashnake.animite.profile.dev.internal.ANILIST_AUTH_DEEPLINK
import com.imashnake.animite.social.RSlash
import com.imashnake.animite.social.RSlashScreen
import com.imashnake.animite.social.Social
import com.imashnake.animite.social.SocialScreen
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
Expand Down Expand Up @@ -110,8 +110,8 @@ fun MainScreen(modifier: Modifier = Modifier) {
) {
ProfileScreen()
}
composable<RSlash> {
RSlashScreen()
composable<Social> {
SocialScreen()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,22 @@ enum class NavigationBarPaths(
val icon: @Composable () -> Unit,
@StringRes val labelRes: Int
) {
RSlash(
Social(
navigateTo = {
it.navigate(com.imashnake.animite.social.RSlash) {
it.navigate(com.imashnake.animite.social.Social) {
popUpTo(id = it.graph.findStartDestination().id) {
saveState = true
}
launchSingleTop = true
}
},
matchesDestination = {
it.destination.hierarchy.any { it.hasRoute(com.imashnake.animite.social.RSlash::class) }
it.destination.hierarchy.any { it.hasRoute(com.imashnake.animite.social.Social::class) }
},
icon = {
Icon(ImageVector.vectorResource(R.drawable.rslash), contentDescription = stringResource(R.string.rslash))
Icon(ImageVector.vectorResource(R.drawable.social), contentDescription = stringResource(R.string.rslash))
},
labelRes = R.string.home
labelRes = R.string.rslash
),
Home(
navigateTo = {
Expand Down Expand Up @@ -122,7 +122,7 @@ enum class NavigationBarPaths(
it.destination.hierarchy.any { it.hasRoute(com.imashnake.animite.profile.Profile::class) }
},
icon = {
Icon(Icons.Rounded.AccountCircle, contentDescription = stringResource(R.string.profile))
Icon(ImageVector.vectorResource(R.drawable.profile), contentDescription = stringResource(R.string.profile))
},
labelRes = R.string.profile
),
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M6.828,19C6.634,19 6.474,18.937 6.347,18.81C6.22,18.683 6.157,18.522 6.157,18.328V17.34H5.037C4.858,17.34 4.701,17.276 4.567,17.149C4.433,17.022 4.366,16.862 4.366,16.668C4.366,16.474 4.429,16.313 4.556,16.187C4.683,16.06 4.843,15.996 5.037,15.996H6.157V11.836H4.343C4.194,11.836 4.09,11.765 4.03,11.623C3.97,11.481 4,11.358 4.119,11.254L11.978,4.179C12.097,4.06 12.246,4 12.425,4C12.604,4 12.754,4.06 12.873,4.179L20.731,11.254C20.851,11.358 20.884,11.481 20.832,11.623C20.78,11.765 20.672,11.836 20.507,11.836H18.694V15.996H19.813C20.007,15.996 20.168,16.06 20.295,16.187C20.422,16.313 20.485,16.474 20.485,16.668C20.485,16.862 20.422,17.022 20.295,17.149C20.168,17.276 20.007,17.34 19.813,17.34H18.694V18.328C18.694,18.507 18.631,18.664 18.504,18.799C18.377,18.933 18.216,19 18.022,19C17.828,19 17.668,18.937 17.541,18.81C17.414,18.683 17.351,18.522 17.351,18.328V17.34H13.097V18.328C13.097,18.507 13.034,18.664 12.907,18.799C12.78,18.933 12.619,19 12.425,19C12.231,19 12.071,18.937 11.944,18.81C11.817,18.683 11.754,18.522 11.754,18.328V17.34H7.5V18.328C7.5,18.507 7.437,18.664 7.31,18.799C7.183,18.933 7.022,19 6.828,19ZM13.097,15.996H17.351V11.836L13.097,11.78V15.996Z"
android:pathData="M6.828,19C6.634,19 6.474,18.937 6.347,18.81C6.22,18.683 6.157,18.522 6.157,18.328L6.157,17.34L5.037,17.34C4.858,17.34 4.701,17.276 4.567,17.149C4.433,17.022 4.366,16.862 4.366,16.668C4.366,16.474 4.429,16.313 4.556,16.187C4.683,16.06 4.843,15.996 5.037,15.996L6.157,15.996L6.157,11.836L4.343,11.836C4.194,11.836 4.09,11.765 4.03,11.623C3.97,11.481 4,11.358 4.119,11.254L11.978,4.179C12.097,4.06 12.246,4 12.425,4C12.604,4 12.754,4.06 12.873,4.179L20.731,11.254C20.851,11.358 20.884,11.481 20.832,11.623C20.78,11.765 20.672,11.836 20.507,11.836L18.694,11.836L18.694,15.996L19.813,15.996C20.007,15.996 20.168,16.06 20.295,16.187C20.422,16.313 20.485,16.474 20.485,16.668C20.485,16.862 20.422,17.022 20.295,17.149C20.168,17.276 20.007,17.34 19.813,17.34L18.694,17.34L18.694,18.328C18.694,18.507 18.631,18.664 18.504,18.799C18.377,18.933 18.216,19 18.022,19C17.828,19 17.668,18.937 17.541,18.81C17.414,18.683 17.351,18.522 17.351,18.328L17.351,17.34L13.097,17.34L13.097,18.328C13.097,18.507 13.034,18.664 12.907,18.799C12.78,18.933 12.619,19 12.425,19C12.231,19 12.071,18.937 11.944,18.81C11.817,18.683 11.754,18.522 11.754,18.328L11.754,17.34L7.5,17.34L7.5,18.328C7.5,18.507 7.437,18.664 7.31,18.799C7.183,18.933 7.022,19 6.828,19ZM13.097,15.996L17.351,15.996L17.351,11.836L13.097,11.78L13.097,15.996Z"
android:fillColor="#152232"/>
</vector>
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/profile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12,3C7.032,3 3,7.032 3,12 3,16.968 7.032,21 12,21 16.968,21 21,16.968 21,12 21,7.032 16.968,3 12,3ZM12,6.6c1.737,0 3.15,1.413 3.15,3.15C15.15,11.487 13.737,12.9 12,12.9 10.263,12.9 8.85,11.487 8.85,9.75 8.85,8.013 10.263,6.6 12,6.6ZM12,19.2C10.173,19.2 8.013,18.462 6.474,16.608 7.995,15.42 9.912,14.7 12,14.7c2.088,0 4.005,0.72 5.526,1.908C15.987,18.462 13.827,19.2 12,19.2Z"
android:fillColor="#e8eaed"/>
</vector>
10 changes: 0 additions & 10 deletions app/src/main/res/drawable/rslash.xml

This file was deleted.

10 changes: 10 additions & 0 deletions app/src/main/res/drawable/social.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="m12,3c-4.968,0 -9,4.032 -9,9 0,4.968 4.032,9 9,9 4.968,0 9,-4.032 9,-9C21,7.032 16.968,3 12,3ZM8.4,16.95c-1.242,0 -2.25,-1.008 -2.25,-2.25 0,-1.242 1.008,-2.25 2.25,-2.25 1.242,0 2.25,1.008 2.25,2.25 0,1.242 -1.008,2.25 -2.25,2.25zM9.75,8.4c0,-1.242 1.008,-2.25 2.25,-2.25 1.242,0 2.25,1.008 2.25,2.25 0,1.242 -1.008,2.25 -2.25,2.25 -1.242,0 -2.25,-1.008 -2.25,-2.25zM15.6,16.95c-1.242,0 -2.25,-1.008 -2.25,-2.25 0,-1.242 1.008,-2.25 2.25,-2.25 1.242,0 2.25,1.008 2.25,2.25 0,1.242 -1.008,2.25 -2.25,2.25z"
android:strokeWidth="0.9"
android:fillColor="#e8eaed"/>
</vector>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import kotlinx.serialization.Serializable
import com.imashnake.animite.core.R as coreR

@Composable
fun RSlashScreen() {
fun SocialScreen() {
Box(
contentAlignment = Alignment.Center,
modifier = Modifier
Expand All @@ -39,4 +39,4 @@ fun RSlashScreen() {
}

@Serializable
data object RSlash
data object Social

0 comments on commit 54e8345

Please sign in to comment.