Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chooloolib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ dependencies {
'io.github.l4digital:fastscroll:2.0.1',
'io.reactivex.rxjava2:rxandroid:2.0.1',
'com.google.dagger:hilt-android:2.38.1',
'com.google.android.material:material:1.4.0',
'com.google.android.material:material:1.6.0',
'com.github.abdularis:circularimageview:1.5',
'com.daimajia.androidanimations:library:2.4@aar',
'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ interface PreferencesInteractor : BaseInteractor<PreferencesInteractor.Listener>
GREEN("green", R.style.Accent_Green),
ORANGE("orange", R.style.Accent_Orange),
PURPLE("purple", R.style.Accent_Purple),
SYSTEM("system", R.style.Accent_System),
DEFAULT(BLUE.key, BLUE.theme);

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ open class SettingsViewState @Inject constructor(
colors.getColor(R.color.green_background) -> GREEN
colors.getColor(R.color.orange_background) -> ORANGE
colors.getColor(R.color.purple_background) -> PURPLE
colors.getColor(R.color.system_background) -> SYSTEM
else -> DEFAULT
}
navigations.goToLauncherActivity()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import javax.inject.Inject
@AndroidEntryPoint
@SuppressLint("CustomViewStyleable", "Recycle")
class Tab : AppCompatTextView {
private val enabledColor by lazy { context.getAttrColor(R.attr.colorOnSurface) }
private val enabledColor by lazy { context.getAttrColor(R.attr.colorSurface) }
private val disabledColor by lazy { context.getAttrColor(R.attr.colorLightBackground) }

@Inject lateinit var animationsInteractor: AnimationsInteractor
Expand Down
4 changes: 3 additions & 1 deletion chooloolib/src/main/res/drawable/bubble_background.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
android:color="?colorSurface">

<item>
<shape android:shape="rectangle">
<shape
android:shape="rectangle">
<corners android:radius="@dimen/corner_radius" />
<solid android:color="@color/color_card_bg" />
</shape>
</item>
</ripple>
3 changes: 3 additions & 0 deletions chooloolib/src/main/res/layout/bottom_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
android:id="@+id/bottom_dialog_fragment_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:backgroundTint="@color/color_card_bg"
android:fitsSystemWindows="true">

<View
Expand All @@ -12,6 +13,7 @@
android:layout_height="@dimen/swipe_indicator_height"
android:layout_margin="@dimen/swipe_indicator_margin"
android:background="@drawable/swipe_indicator_background"
android:backgroundTint="@color/color_bg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand All @@ -21,6 +23,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:backgroundTint="@color/color_card_bg"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down
14 changes: 14 additions & 0 deletions chooloolib/src/main/res/layout/call_actions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
android:padding="@dimen/icon_button_size_big"
app:activatedIcon="@drawable/round_mic_off_24"
app:icon="@drawable/round_mic_24"
android:tint="@color/color_on_background"
app:backgroundTint="@color/color_fab"
app:size="huge" />

<!-- speaker -->
Expand All @@ -23,6 +25,8 @@
android:layout_height="wrap_content"
app:activatedIcon="@drawable/round_volume_up_24"
app:icon="@drawable/round_volume_down_24"
android:tint="@color/color_on_background"
app:backgroundTint="@color/color_fab"
app:size="huge" />

<!-- hold -->
Expand All @@ -33,6 +37,8 @@
android:padding="@dimen/icon_button_size_big"
android:layout_height="wrap_content"
app:activatedIcon="@drawable/round_play_arrow_24"
android:tint="@color/color_on_background"
app:backgroundTint="@color/color_fab"
app:size="huge" />

<!-- add call -->
Expand All @@ -42,6 +48,8 @@
android:layout_width="wrap_content"
android:padding="@dimen/icon_button_size_big"
android:layout_height="wrap_content"
android:tint="@color/color_on_background"
app:backgroundTint="@color/color_fab"
app:size="huge" />

<!-- keypad -->
Expand All @@ -51,6 +59,8 @@
android:layout_height="wrap_content"
android:padding="@dimen/icon_button_size_big"
app:icon="@drawable/round_dialpad_24"
android:tint="@color/color_on_background"
app:backgroundTint="@color/color_fab"
app:size="huge" />

<!-- swap -->
Expand All @@ -60,6 +70,8 @@
android:padding="@dimen/icon_button_size_big"
android:layout_height="wrap_content"
app:icon="@drawable/round_swap_calls_24"
android:tint="@color/color_on_background"
app:backgroundTint="@color/color_fab"
app:size="huge" />

<!-- merge -->
Expand All @@ -69,5 +81,7 @@
android:padding="@dimen/icon_button_size_big"
android:layout_height="wrap_content"
app:icon="@drawable/round_call_merge_24"
android:tint="@color/color_on_background"
app:backgroundTint="@color/color_fab"
app:size="huge" />
</androidx.constraintlayout.motion.widget.MotionLayout>
46 changes: 46 additions & 0 deletions chooloolib/src/main/res/values-night-v31/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="color_surface">@android:color/system_accent1_800</color>
<color name="color_text">@android:color/primary_text_dark</color>
<color name="color_on_background">@android:color/system_accent1_100</color>
<color name="color_fab">@android:color/system_accent1_700</color>
<color name="color_bg">@android:color/system_neutral1_800</color>
<color name="color_card_bg">@android:color/system_neutral1_900</color>
<color name="color_image_placeholder_background">@android:color/system_accent1_800</color>
<color name="color_image_placeholder_foreground">@android:color/system_accent1_50</color>
<color name="color_light_foreground">@android:color/system_accent1_200</color>
<color name="color_light_background">@android:color/system_accent1_700</color>
<color name="color_opposite">@android:color/system_accent1_100</color>
<color name="color_hint">@android:color/system_neutral1_600</color>
<color name="color_on_surface">@android:color/system_accent1_300</color>
<!-- As a hack, I'm overiding the accent colors automatically
if the user is running v31 -->
<!--region accent colors-->
<color name="blue_background">#566682</color>
<color name="blue_foreground">#AFCBFA</color>

<color name="orange_background">#816553</color>
<color name="orange_foreground">#EBBA96</color>

<color name="green_background">#587363</color>
<color name="green_foreground">#A2CFAE</color>

<color name="purple_background">#6b5781</color>
<color name="purple_foreground">#D7AEFC</color>

<color name="red_background">#7d5858</color>
<color name="red_foreground">#F5AEA8</color>

<color name="system_background">@color/color_fab</color>
<color name="system_foreground">@color/color_on_background</color>

<array name="accent_colors">
<item>@color/blue_background</item>
<item>@color/orange_background</item>
<item>@color/green_background</item>
<item>@color/purple_background</item>
<item>@color/red_background</item>
<item>@color/system_background</item>
</array>
<!--endregion-->
</resources>
46 changes: 46 additions & 0 deletions chooloolib/src/main/res/values-v31/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="color_surface">@android:color/system_accent1_200</color>
<color name="color_text">@android:color/primary_text_light</color>
<color name="color_on_background">@android:color/system_accent1_800</color>
<color name="color_fab">@android:color/system_accent1_300</color>
<color name="color_bg">@android:color/system_neutral1_100</color>
<color name="color_card_bg">@android:color/system_neutral1_50</color>
<color name="color_image_placeholder_background">@android:color/system_accent1_300</color>
<color name="color_image_placeholder_foreground">@android:color/system_accent1_900</color>
<color name="color_light_foreground">@android:color/system_accent1_800</color>
<color name="color_light_background">@android:color/system_accent1_50</color>
<color name="color_opposite">@android:color/system_accent1_900</color>
<color name="color_hint">@android:color/system_neutral1_600</color>

<!-- As a hack, I'm overiding the accent colors automatically
if the user is running v31 -->
<!--region accent colors-->
<color name="blue_background">#E8F0FD</color>
<color name="blue_foreground">#4F9FE1</color>

<color name="orange_background">#FDEFE2</color>
<color name="orange_foreground">#F1974D</color>

<color name="green_background">#E7F4EA</color>
<color name="green_foreground">#4FA266</color>

<color name="purple_background">#F4E8FE</color>
<color name="purple_foreground">#AF66EC</color>

<color name="red_background">#FCE8E7</color>
<color name="red_foreground">#D54E45</color>

<color name="system_background">@color/color_fab</color>
<color name="system_foreground">@color/color_on_background</color>
<!--endregion-->

<array name="accent_colors">
<item>@color/blue_background</item>
<item>@color/orange_background</item>
<item>@color/green_background</item>
<item>@color/purple_background</item>
<item>@color/red_background</item>
<item>@color/system_background</item>
</array>
</resources>
8 changes: 8 additions & 0 deletions chooloolib/src/main/res/values-v31/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Accent" />
<style name="Accent.System">
<item name="colorSecondary">@color/system_background</item>
<item name="colorOnSecondary">@color/system_foreground</item>
</style>
</resources>
8 changes: 8 additions & 0 deletions chooloolib/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
<color name="color_light_background">#ABEDEDED</color>
<color name="color_image_placeholder_background">@color/color_surface</color>
<color name="color_image_placeholder_foreground">#95ACACAC</color>
<color name="color_fab">#4F9FE1</color>
<color name="color_card_bg">#F6F7FB</color>
<color name="color_on_surface">#F6F7FB</color>

<!--endregion-->

<!--region accent colors-->
Expand All @@ -30,6 +34,9 @@

<color name="red_background">#FCE8E7</color>
<color name="red_foreground">#D54E45</color>

<color name="system_background">@color/color_fab</color>
<color name="system_foreground">@color/color_on_background</color>
<!--endregion-->

<array name="accent_colors">
Expand All @@ -38,5 +45,6 @@
<item>@color/green_background</item>
<item>@color/purple_background</item>
<item>@color/red_background</item>
<item>@color/system_background</item>
</array>
</resources>
8 changes: 5 additions & 3 deletions chooloolib/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
<!--endregion-->

<!--region bottom dialog -->
<style name="Chooloo.BottomSheet" parent="Theme.MaterialComponents.DayNight.BottomSheetDialog">
<style name="Chooloo.BottomSheet" parent="Theme.Material3.DayNight.BottomSheetDialog">
<item name="android:backgroundDimAmount">0.05</item>
<item name="bottomSheetStyle">@style/Chooloo.BottomDialog.BottomSheetStyle</item>
</style>

<style name="Chooloo.AlertDialog" parent="Theme.MaterialComponents.DayNight.Dialog.Alert">
<style name="Chooloo.AlertDialog" parent="Theme.Material3.DayNight.Dialog.Alert">
<item name="buttonBarButtonStyle">@style/Chooloo.AlertDialog.Button</item>
</style>

Expand All @@ -65,14 +65,16 @@

<style name="Chooloo.BottomDialog" />

<style name="Chooloo.BottomDialog.BottomSheetStyle" parent="Widget.MaterialComponents.BottomSheet.Modal">
<style name="Chooloo.BottomDialog.BottomSheetStyle" parent="Widget.Material3.BottomSheet.Modal">
<item name="shapeAppearanceOverlay">@style/Chooloo.BottomDialog.ShapeAppearanceOverlay
</item>
<item name="behavior_peekHeight">600dp</item>
<item name="android:backgroundTint">@color/color_card_bg</item>
</style>

<style name="Chooloo.BottomDialog.ShapeAppearanceOverlay">
<item name="android:windowTranslucentStatus">true</item>
<item name="android:backgroundTint">@color/color_card_bg</item>
<item name="cornerSizeTopRight">@dimen/corner_radius</item>
<item name="cornerSizeTopLeft">@dimen/corner_radius</item>
<item name="cornerFamily">rounded</item>
Expand Down
1 change: 1 addition & 0 deletions chooloolib/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@
<item name="colorSecondary">@color/red_background</item>
<item name="colorOnSecondary">@color/red_foreground</item>
</style>

</resources>
2 changes: 1 addition & 1 deletion koler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ dependencies {
'androidx.preference:preference-ktx:1.1.1',
'org.jetbrains.kotlin:kotlin-stdlib:1.4.21',
'androidx.biometric:biometric:1.2.0-alpha02',
'com.google.android.material:material:1.3.0',
'com.google.android.material:material:1.6.0',
'com.android.support:recyclerview-v7:23.2.1',
'com.github.abdularis:circularimageview:1.5',
'androidx.navigation:navigation-ui-ktx:2.3.3',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ class MainViewState @Inject constructor(
fun onViewIntent(intent: Intent) {
try {
val intentText = URLDecoder.decode(intent.dataString ?: "", "utf-8")
showDialerEvent.call(intentText.substringAfter("tel:"))
// I made this variable seperate instead of calculating it when
// calling showDialerEvent and for some reason it made it start working.
// Perhaps the space added after "tel:" also did the trick. Not sure
// but it's working great now.
// TODO: Turn off dialpad sounds when clicking numbers.
val number = intentText.substringAfter("tel: ")
showDialerEvent.call(number)
} catch (e: Exception) {
errorEvent.call(R.string.error_couldnt_get_number_from_intent)
}
Expand Down
3 changes: 3 additions & 0 deletions koler/src/main/res/layout/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:backgroundTint="@color/color_bg"
app:layoutDescription="@xml/main_scene">

<!-- menu button -->
Expand Down Expand Up @@ -44,6 +45,8 @@
android:id="@+id/main_dialpad_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/color_fab"
android:tint="@color/color_on_background"
app:size="big"
app:icon="@drawable/round_dialpad_24" />
</androidx.constraintlayout.motion.widget.MotionLayout>
2 changes: 1 addition & 1 deletion kontacts/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ dependencies {
'androidx.preference:preference-ktx:1.1.1',
'org.jetbrains.kotlin:kotlin-stdlib:1.4.21',
'androidx.biometric:biometric:1.2.0-alpha02',
'com.google.android.material:material:1.3.0',
'com.google.android.material:material:1.6.0',
'com.android.support:recyclerview-v7:23.2.1',
'com.github.abdularis:circularimageview:1.5',
'androidx.navigation:navigation-ui-ktx:2.3.3',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@ class ContactFragment : BaseFragment<ContactViewState>() {
}

binding.apply {
contactButtonSms.setOnClickListener { viewState.onSmsClick() }


// contactButtonSms.setOnClickListener { viewState.onSmsClick() }
contactButtonCall.setOnClickListener { viewState.onCallClick() }
contactButtonEdit.setOnClickListener { viewState.onEditClick() }
contactButtonDelete.setOnClickListener { viewState.onDeleteClick() }
contactButtonHistory.setOnClickListener { viewState.onHistoryClick() }
contactButtonWhatsapp.setOnClickListener { viewState.onWhatsappClick() }
// contactButtonEdit.setOnClickListener { viewState.onEditClick() }
// contactButtonDelete.setOnClickListener { viewState.onDeleteClick() }
// contactButtonHistory.setOnClickListener { viewState.onHistoryClick() }
// contactButtonWhatsapp.setOnClickListener { viewState.onWhatsappClick() }
}

arguments?.getLong(ARG_CONTACT_ID)?.let { viewState.onContactId(it) }
Expand Down
3 changes: 2 additions & 1 deletion kontacts/src/main/res/layout/contact.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
android:layout_width="@dimen/image_size_big"
android:layout_height="@dimen/image_size_big"
android:layout_marginTop="@dimen/default_spacing_big"
android:background="@color/color_bg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand Down Expand Up @@ -103,5 +104,5 @@
app:layout_constraintTop_toBottomOf="@id/brief_contact_button_history"
android:layout_height="wrap_content"
android:background="@drawable/bubble_background"
android:backgroundTint="?colorSurface" />
android:backgroundTint="@color/color_card_bg" />
</androidx.constraintlayout.widget.ConstraintLayout>
Loading