Moves the hang up button above all other buttons
This commit is contained in:
Mario Danic 2018-11-29 14:35:55 +01:00
parent 7ffee332fa
commit 266ee8eda1
2 changed files with 78 additions and 73 deletions

View File

@ -170,8 +170,8 @@ public class CallController extends BaseController {
@BindView(R.id.remote_renderers_layout) @BindView(R.id.remote_renderers_layout)
LinearLayout remoteRenderersLayout; LinearLayout remoteRenderersLayout;
@BindView(R.id.callControlsLinearLayoutView) @BindView(R.id.callControlsRelativeLayout)
LinearLayout callControls; RelativeLayout callControls;
@BindView(R.id.call_control_microphone) @BindView(R.id.call_control_microphone)
FlipView microphoneControlButton; FlipView microphoneControlButton;
@BindView(R.id.call_control_camera) @BindView(R.id.call_control_camera)

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?><!--
<!--
~ Nextcloud Talk application ~ Nextcloud Talk application
~ ~
~ @author Mario Danic ~ @author Mario Danic
@ -38,10 +37,10 @@
android:layout_width="@dimen/item_height" android:layout_width="@dimen/item_height"
android:layout_height="@dimen/item_height" android:layout_height="@dimen/item_height"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginStart="@dimen/activity_horizontal_margin" android:layout_marginStart="@dimen/activity_horizontal_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:indeterminate="true" android:indeterminate="true"
android:indeterminateTint="@color/colorPrimary" android:indeterminateTint="@color/colorPrimary"
android:indeterminateTintMode="src_in" /> android:indeterminateTintMode="src_in" />
@ -71,14 +70,13 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:animateLayoutChanges="true" android:animateLayoutChanges="true"
android:background="@color/grey950" android:background="@color/grey950"
android:orientation="vertical"> android:orientation="vertical"></LinearLayout>
</LinearLayout>
<FrameLayout <FrameLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true" android:layout_alignParentTop="true"
android:layout_alignParentTop="true"> android:layout_alignParentEnd="true">
<org.webrtc.SurfaceViewRenderer <org.webrtc.SurfaceViewRenderer
android:id="@+id/pip_video_view" android:id="@+id/pip_video_view"
@ -88,8 +86,7 @@
android:layout_margin="16dp" android:layout_margin="16dp"
android:visibility="invisible" /> android:visibility="invisible" />
<com.nextcloud.talk.utils.MagicFlipView <com.nextcloud.talk.utils.MagicFlipView xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/call_control_switch_camera" android:id="@+id/call_control_switch_camera"
android:layout_width="40dp" android:layout_width="40dp"
android:layout_height="40dp" android:layout_height="40dp"
@ -103,58 +100,66 @@
</FrameLayout> </FrameLayout>
</RelativeLayout> </RelativeLayout>
<RelativeLayout
android:id="@+id/callControlsRelativeLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
android:animateLayoutChanges="true">
<com.nextcloud.talk.utils.MagicFlipView xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/callControlHangupView"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_above="@id/callControlsLinearLayoutView"
android:layout_centerHorizontal="true"
app:checked="false"
app:enableInitialAnimation="false"
app:frontBackgroundColor="@color/nc_darkRed"
app:frontImage="@drawable/ic_call_end_white_24px" />
<LinearLayout <LinearLayout
android:id="@+id/callControlsLinearLayoutView" android:id="@+id/callControlsLinearLayoutView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginBottom="16dp" android:layout_marginBottom="24dp"
android:animateLayoutChanges="true" android:animateLayoutChanges="true"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:gravity="center"> android:gravity="center">
<com.nextcloud.talk.utils.MagicFlipView <com.nextcloud.talk.utils.MagicFlipView xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/call_control_microphone" android:id="@+id/call_control_microphone"
android:layout_width="60dp" android:layout_width="60dp"
android:layout_height="60dp" android:layout_height="60dp"
android:layout_margin="24dp" android:layout_marginStart="24dp"
android:alpha="0.7" android:alpha="0.7"
app:checked="false" app:checked="false"
app:enableInitialAnimation="false" app:enableInitialAnimation="false"
app:frontBackgroundColor="@color/colorPrimary" app:frontBackgroundColor="@color/colorPrimary"
app:frontImage="@drawable/ic_mic_off_white_24px" /> app:frontImage="@drawable/ic_mic_off_white_24px" />
<com.nextcloud.talk.utils.MagicFlipView <com.nextcloud.talk.utils.MagicFlipView xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/callControlHangupView"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_margin="24dp"
app:checked="false"
app:enableInitialAnimation="false"
app:frontBackgroundColor="@color/nc_darkRed"
app:frontImage="@drawable/ic_call_end_white_24px"/>
<com.nextcloud.talk.utils.MagicFlipView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/call_control_camera" android:id="@+id/call_control_camera"
android:layout_width="60dp" android:layout_width="60dp"
android:layout_height="60dp" android:layout_height="60dp"
android:layout_margin="24dp" android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
android:alpha="0.7" android:alpha="0.7"
app:checked="false" app:checked="false"
app:enableInitialAnimation="false" app:enableInitialAnimation="false"
app:frontBackgroundColor="@color/colorPrimary" app:frontBackgroundColor="@color/colorPrimary"
app:frontImage="@drawable/ic_videocam_off_white_24px" /> app:frontImage="@drawable/ic_videocam_off_white_24px" />
<com.nextcloud.talk.utils.MagicFlipView <com.nextcloud.talk.utils.MagicFlipView xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/callControlEnableSpeaker" android:id="@+id/callControlEnableSpeaker"
android:layout_width="60dp" android:layout_width="60dp"
android:layout_height="60dp" android:layout_height="60dp"
android:layout_margin="24dp" android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
android:visibility="gone" android:visibility="gone"
app:animateRearImage="false" app:animateRearImage="false"
app:checked="false" app:checked="false"
@ -165,5 +170,5 @@
app:rearImage="@drawable/ic_volume_up_white_24dp" /> app:rearImage="@drawable/ic_volume_up_white_24dp" />
</LinearLayout> </LinearLayout>
</RelativeLayout>
</RelativeLayout> </RelativeLayout>