Skip to content

Commit

Permalink
style: add 'no sms' icon
Browse files Browse the repository at this point in the history
  • Loading branch information
SuhasDissa committed May 14, 2024
1 parent 92da109 commit cfa1cf3
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 4 deletions.
46 changes: 46 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package com.bnyro.contacts.presentation.components

import androidx.annotation.DrawableRes
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.size
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.dp
import com.bnyro.contacts.R

@Composable
fun BlobIconBox(@DrawableRes icon: Int) {
Box(
contentAlignment = Alignment.Center,
modifier = Modifier
.fillMaxSize()
.alpha(0.3f)
) {
Image(
modifier = Modifier.size(350.dp),
painter = painterResource(id = R.drawable.blob),
contentDescription = null,
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.secondaryContainer)
)
Image(
modifier = Modifier.size(250.dp),
painter = painterResource(id = icon),
contentDescription = null,
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onSecondaryContainer)
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ import com.bnyro.contacts.R
import com.bnyro.contacts.domain.model.ContactData
import com.bnyro.contacts.domain.model.SmsThread
import com.bnyro.contacts.navigation.NavRoutes
import com.bnyro.contacts.presentation.components.BlobIconBox
import com.bnyro.contacts.presentation.components.ClickableIcon
import com.bnyro.contacts.presentation.components.NothingHere
import com.bnyro.contacts.presentation.components.TopBarMoreMenu
import com.bnyro.contacts.presentation.features.NumberPickerDialog
import com.bnyro.contacts.presentation.screens.calllog.SheetSettingItem
Expand Down Expand Up @@ -162,9 +162,7 @@ fun SmsListScreen(
SmsSearchScreen(smsModel, threadList, { showSearch = false }, onClickMessage)
}
} else {
Column(Modifier.padding(pv)) {
NothingHere()
}
BlobIconBox(icon = R.drawable.ic_no_sms)
}

if (showNumberPicker) {
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/blob.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!-- Design by SuhasDissa -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="200dp"
android:height="200dp"
android:viewportWidth="480"
android:viewportHeight="480">
<path
android:fillColor="#000"
android:pathData="M431.5,295.5Q452,351 404.5,380Q357,409 311.5,430.5Q266,452 220.5,431Q175,410 142,383Q109,356 70.5,323.5Q32,291 31,239.5Q30,188 56,144Q82,100 122.5,68.5Q163,37 213,44.5Q263,52 319,48Q375,44 398,94.5Q421,145 416,192.5Q411,240 431.5,295.5Z" />
</vector>
29 changes: 29 additions & 0 deletions app/src/main/res/drawable/ic_no_sms.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="180dp"
android:height="180dp"
android:viewportWidth="180"
android:viewportHeight="180">
<path
android:fillAlpha="0.75"
android:fillColor="#00000000"
android:pathData="m122.26,53.97v45.14c0,6.73 -5.42,12.14 -12.14,12.14L57.74,111.26v3.73c0,6.73 5.41,12.14 12.14,12.14h53.15c0,0 13.17,8.36 18.55,11.78 4.86,3.09 9.13,5.81 9.11,-2.78 -0.11,-56.76 0.04,-70.02 0.04,-70.02 0,-6.73 -5.42,-12.14 -12.14,-12.14z"
android:strokeWidth="7.322"
android:strokeAlpha="0.75"
android:strokeColor="#000000"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#00000000"
android:pathData="m70.13,88.43c3.37,-3.54 8.93,-2.52 11.36,0m9.53,-20.73v3.51M60.52,67.7v3.51"
android:strokeWidth="7.322"
android:strokeColor="#000000"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<path
android:fillColor="#00000000"
android:pathData="m41.41,38.1h68.71c6.73,0 12.14,5.42 12.14,12.14v48.88c0,6.73 -5.42,12.14 -12.14,12.14L56.97,111.26c0,0 -13.17,8.35 -18.55,11.78 -4.86,3.09 -9.13,5.81 -9.11,-2.78 0.11,-56.76 -0.04,-70.02 -0.04,-70.02 0,-6.73 5.42,-12.14 12.14,-12.14z"
android:strokeWidth="7.322"
android:strokeColor="#000000"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
</vector>

0 comments on commit cfa1cf3

Please sign in to comment.