adding buttons, microphone and keyboard buttons

This commit is contained in:
tibbi 2020-04-30 15:18:09 +02:00
parent 0d78355ba7
commit d835c5d80b
5 changed files with 133 additions and 26 deletions

View File

@ -13,5 +13,15 @@ class CallActivity : SimpleActivity() {
setContentView(R.layout.activity_call)
updateTextColors(call_holder)
initButtons()
}
private fun initButtons() {
call_decline.setOnClickListener { }
call_accept.setOnClickListener { }
call_toggle_microphone.setOnClickListener { }
call_toggle_speaker.setOnClickListener { }
call_dialpad.setOnClickListener { }
}
}

View File

@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="18dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#ffffff"
android:pathData="m12,14c1.66,0 2.99,-1.34 2.99,-3L15,5C15,3.34 13.66,2 12,2 10.34,2 9,3.34 9,5l0,6c0,1.66 1.34,3 3,3zM17.3,11c0,3 -2.54,5.1 -5.3,5.1C9.24,16.1 6.7,14 6.7,11L5,11c0,3.41 2.72,6.23 6,6.72l0,3.2123 2,0L13,17.72c3.28,-0.48 6,-3.3 6,-6.72z" />
<path
android:fillAlpha="1"
android:fillColor="#ffffff"
android:fillType="nonZero"
android:pathData="M5,11.0547a0.8516,0.9245 0,1 0,1.7031 0a0.8516,0.9245 0,1 0,-1.7031 0z"
android:strokeAlpha="1"
android:strokeColor="#00000000" />
<path
android:fillAlpha="1"
android:fillColor="#ffffff"
android:fillType="nonZero"
android:pathData="M17.293,11a0.8516,0.9245 0,1 0,1.7031 0a0.8516,0.9245 0,1 0,-1.7031 0z"
android:strokeAlpha="1"
android:strokeColor="#00000000" />
<path
android:fillAlpha="1"
android:fillColor="#ffffff"
android:fillType="nonZero"
android:pathData="M10.9992,20.9539a1,0.9245 0,1 0,2 0a1,0.9245 0,1 0,-2 0z"
android:strokeAlpha="1"
android:strokeColor="#00000000" />
</vector>

View File

@ -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:fillColor="#FFFFFF"
android:pathData="M16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v2.21l2.45,2.45c0.03,-0.2 0.05,-0.41 0.05,-0.63zM19,12c0,0.94 -0.2,1.82 -0.54,2.64l1.51,1.51C20.63,14.91 21,13.5 21,12c0,-4.28 -2.99,-7.86 -7,-8.77v2.06c2.89,0.86 5,3.54 5,6.71zM4.27,3L3,4.27 7.73,9L3,9v6h4l5,5v-6.73l4.25,4.25c-0.67,0.52 -1.42,0.93 -2.25,1.18v2.06c1.38,-0.31 2.63,-0.95 3.69,-1.81L19.73,21 21,19.73l-9,-9L4.27,3zM12,4L9.91,6.09 12,8.18L12,4z" />
</vector>

View File

@ -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:fillColor="#FFFFFF"
android:pathData="M3,9v6h4l5,5L12,4L7,9L3,9zM16.5,12c0,-1.77 -1.02,-3.29 -2.5,-4.03v8.05c1.48,-0.73 2.5,-2.25 2.5,-4.02zM14,3.23v2.06c2.89,0.86 5,3.54 5,6.71s-2.11,5.85 -5,6.71v2.06c4.01,-0.91 7,-4.49 7,-8.77s-2.99,-7.86 -7,-8.77z" />
</vector>

View File

@ -6,45 +6,94 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/caller_avatar"
android:layout_width="@dimen/incoming_call_button_size"
android:layout_height="@dimen/incoming_call_button_size"
android:contentDescription="@string/accept"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.2"
tools:src="@drawable/ic_call_accept" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/caller_name_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/normal_margin"
android:textSize="@dimen/caller_name_text_size"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/caller_avatar"
tools:text="Caller name" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/caller_number_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:alpha="0.8"
android:textSize="@dimen/caller_number_text_size"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/caller_name_label"
tools:text="123 456 789" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/incoming_call_holder"
android:id="@+id/ongoing_call_holder"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/caller_avatar"
android:layout_width="@dimen/incoming_call_button_size"
android:layout_height="@dimen/incoming_call_button_size"
android:contentDescription="@string/accept"
android:id="@+id/call_toggle_microphone"
android:layout_width="@dimen/dialpad_button_size"
android:layout_height="@dimen/dialpad_button_size"
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="@dimen/medium_margin"
android:src="@drawable/ic_microphone_vector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.15"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.75" />
<ImageView
android:id="@+id/call_toggle_speaker"
android:layout_width="@dimen/dialpad_button_size"
android:layout_height="@dimen/dialpad_button_size"
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="@dimen/medium_margin"
android:src="@drawable/ic_speaker_on_vector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.2"
tools:src="@drawable/ic_call_accept" />
app:layout_constraintVertical_bias="0.75" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/caller_name_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/normal_margin"
android:textSize="@dimen/caller_name_text_size"
<ImageView
android:id="@+id/call_dialpad"
android:layout_width="@dimen/dialpad_button_size"
android:layout_height="@dimen/dialpad_button_size"
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="@dimen/medium_margin"
android:src="@drawable/ic_dialpad_vector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.85"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/caller_avatar"
tools:text="Caller name" />
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.75" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/caller_number_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/medium_margin"
android:alpha="0.8"
android:textSize="@dimen/caller_number_text_size"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/caller_name_label"
tools:text="123 456 789" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/incoming_call_holder"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">
<ImageView
android:id="@+id/call_decline"