mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Small fixes
This commit is contained in:
parent
3a50ab3b91
commit
26cd91ceb2
11 changed files with 42 additions and 7 deletions
|
|
@ -75,6 +75,13 @@ class MainActivity : AppCompatActivity() {
|
|||
drawerMenuViewModel.startAssistantEvent.observe(this) {
|
||||
it.consume {
|
||||
startActivity(Intent(baseContext, AssistantActivity::class.java))
|
||||
binding.sideMenu.close()
|
||||
}
|
||||
}
|
||||
|
||||
drawerMenuViewModel.closeDrawerEvent.observe(this) {
|
||||
it.consume {
|
||||
binding.sideMenu.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,9 +22,15 @@ class CallLogModel(val callLog: CallLog) {
|
|||
// Core thread
|
||||
isOutgoing.postValue(callLog.dir == Dir.Outgoing)
|
||||
|
||||
dateTime.postValue(
|
||||
TimestampUtils.toString(callLog.startDate, shortDate = false, hideYear = false)
|
||||
)
|
||||
val timestamp = callLog.startDate
|
||||
val displayedDate = if (TimestampUtils.isToday(timestamp)) {
|
||||
TimestampUtils.timeToString(timestamp)
|
||||
} else if (TimestampUtils.isYesterday(timestamp)) {
|
||||
"Hier"
|
||||
} else {
|
||||
TimestampUtils.dateToString(timestamp)
|
||||
}
|
||||
dateTime.postValue(displayedDate)
|
||||
|
||||
val friend = coreContext.core.findFriend(address)
|
||||
if (friend != null) {
|
||||
|
|
|
|||
|
|
@ -29,6 +29,15 @@ class DrawerMenuViewModel : ViewModel() {
|
|||
MutableLiveData<Event<Boolean>>()
|
||||
}
|
||||
|
||||
val closeDrawerEvent: MutableLiveData<Event<Boolean>> by lazy {
|
||||
MutableLiveData<Event<Boolean>>()
|
||||
}
|
||||
|
||||
fun closeDrawerMenu() {
|
||||
// UI thread
|
||||
closeDrawerEvent.value = Event(true)
|
||||
}
|
||||
|
||||
fun addAccount() {
|
||||
// UI thread
|
||||
startAssistantEvent.value = Event(true)
|
||||
|
|
|
|||
6
app/src/main/res/font/noto_sans_500.xml
Normal file
6
app/src/main/res/font/noto_sans_500.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<font-family xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<font
|
||||
android:fontStyle="normal"
|
||||
android:font="@font/noto_sans_medium" />
|
||||
</font-family>
|
||||
BIN
app/src/main/res/font/noto_sans_medium.ttf
Normal file
BIN
app/src/main/res/font/noto_sans_medium.ttf
Normal file
Binary file not shown.
|
|
@ -200,6 +200,7 @@
|
|||
android:layout_marginTop="45dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:background="@drawable/shape_round_white_background"
|
||||
android:orientation="vertical"
|
||||
entries="@{viewModel.historyCallLogs}"
|
||||
|
|
|
|||
|
|
@ -25,11 +25,12 @@
|
|||
android:background="@drawable/cell_background">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/default_text_style_500"
|
||||
android:id="@+id/header"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{model.firstLetter, default=`A`}"
|
||||
android:visibility="@{model.showFirstLetter ? View.VISIBLE : View.INVISIBLE, default=invisible}"
|
||||
android:visibility="@{model.showFirstLetter ? View.VISIBLE : View.INVISIBLE}"
|
||||
android:textColor="@color/gray_10"
|
||||
android:textSize="20sp"
|
||||
android:layout_marginStart="16dp"
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:onClick="@{() -> viewModel.closeDrawerMenu()}"
|
||||
style="@style/default_text_style_800"
|
||||
android:id="@+id/brand_name"
|
||||
android:layout_width="0dp"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/primary_color</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:statusBarColor">@color/primary_color</item>
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="android:windowActivityTransitions">true</item>
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,10 @@
|
|||
<item name="android:fontFamily">@font/noto_sans</item>
|
||||
<item name="android:textColor">@color/gray_9</item>
|
||||
</style>
|
||||
<style name="default_text_style_500">
|
||||
<item name="android:fontFamily">@font/noto_sans_500</item>
|
||||
<item name="android:textColor">@color/gray_9</item>
|
||||
</style>
|
||||
<style name="default_text_style_600">
|
||||
<item name="android:fontFamily">@font/noto_sans_600</item>
|
||||
<item name="android:textColor">@color/gray_9</item>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/primary_color</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:statusBarColor">@color/primary_color</item>
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="android:windowActivityTransitions">true</item>
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue