mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 19:49:33 +01:00
define call controls height in dimens.xml
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
47f535fdc9
commit
c07ef4acc8
@ -15,7 +15,6 @@ import com.facebook.drawee.backends.pipeline.Fresco;
|
|||||||
import com.facebook.drawee.interfaces.DraweeController;
|
import com.facebook.drawee.interfaces.DraweeController;
|
||||||
import com.facebook.drawee.view.SimpleDraweeView;
|
import com.facebook.drawee.view.SimpleDraweeView;
|
||||||
import com.nextcloud.talk.R;
|
import com.nextcloud.talk.R;
|
||||||
import com.nextcloud.talk.controllers.CallController;
|
|
||||||
import com.nextcloud.talk.utils.DisplayUtils;
|
import com.nextcloud.talk.utils.DisplayUtils;
|
||||||
|
|
||||||
import org.webrtc.MediaStream;
|
import org.webrtc.MediaStream;
|
||||||
@ -142,7 +141,7 @@ public class ParticipantsAdapter extends BaseAdapter {
|
|||||||
headerHeight = callInfosLinearLayout.getHeight();
|
headerHeight = callInfosLinearLayout.getHeight();
|
||||||
}
|
}
|
||||||
if (isVoiceOnlyCall) {
|
if (isVoiceOnlyCall) {
|
||||||
callControlsHeight = CallController.CALL_CONTROLS_HEIGHT;
|
callControlsHeight = Math.round(mContext.getResources().getDimension(R.dimen.call_controls_height));
|
||||||
}
|
}
|
||||||
int itemHeight = (gridViewWrapper.getHeight() - headerHeight - callControlsHeight) / getRowsCount(getCount());
|
int itemHeight = (gridViewWrapper.getHeight() - headerHeight - callControlsHeight) / getRowsCount(getCount());
|
||||||
int itemMinHeight = Math.round(mContext.getResources().getDimension(R.dimen.call_grid_item_min_height));
|
int itemMinHeight = Math.round(mContext.getResources().getDimension(R.dimen.call_grid_item_min_height));
|
||||||
|
@ -163,8 +163,6 @@ public class CallController extends BaseController {
|
|||||||
|
|
||||||
private static final String TAG = "CallController";
|
private static final String TAG = "CallController";
|
||||||
|
|
||||||
public static final int CALL_CONTROLS_HEIGHT = 300;
|
|
||||||
|
|
||||||
private static final String[] PERMISSIONS_CALL = {
|
private static final String[] PERMISSIONS_CALL = {
|
||||||
android.Manifest.permission.CAMERA,
|
android.Manifest.permission.CAMERA,
|
||||||
android.Manifest.permission.RECORD_AUDIO,
|
android.Manifest.permission.RECORD_AUDIO,
|
||||||
@ -488,7 +486,9 @@ public class CallController extends BaseController {
|
|||||||
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||||
params.addRule(RelativeLayout.BELOW, R.id.callInfosLinearLayout);
|
params.addRule(RelativeLayout.BELOW, R.id.callInfosLinearLayout);
|
||||||
params.setMargins(0,0,0, CALL_CONTROLS_HEIGHT);
|
int callControlsHeight =
|
||||||
|
Math.round(getApplicationContext().getResources().getDimension(R.dimen.call_controls_height));
|
||||||
|
params.setMargins(0,0,0, callControlsHeight);
|
||||||
gridView.setLayoutParams(params);
|
gridView.setLayoutParams(params);
|
||||||
} else {
|
} else {
|
||||||
callControlEnableSpeaker.setVisibility(View.GONE);
|
callControlEnableSpeaker.setVisibility(View.GONE);
|
||||||
|
@ -134,18 +134,17 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/callControlsLinearLayout"
|
android:id="@+id/callControlsLinearLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/call_controls_height"
|
||||||
android:animateLayoutChanges="true"
|
android:animateLayoutChanges="true"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:layout_alignBottom="@id/linearWrapperLayout"
|
android:layout_alignBottom="@id/linearWrapperLayout">
|
||||||
android:layout_marginBottom="16dp">
|
|
||||||
|
|
||||||
<com.facebook.drawee.view.SimpleDraweeView
|
<com.facebook.drawee.view.SimpleDraweeView
|
||||||
android:id="@+id/callControlToggleChat"
|
android:id="@+id/callControlToggleChat"
|
||||||
android:layout_width="60dp"
|
android:layout_width="60dp"
|
||||||
android:layout_height="80dp"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="40dp"
|
android:layout_marginStart="40dp"
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
app:backgroundImage="@color/call_buttons_background"
|
app:backgroundImage="@color/call_buttons_background"
|
||||||
@ -157,7 +156,7 @@
|
|||||||
<com.facebook.drawee.view.SimpleDraweeView
|
<com.facebook.drawee.view.SimpleDraweeView
|
||||||
android:id="@+id/callControlEnableSpeaker"
|
android:id="@+id/callControlEnableSpeaker"
|
||||||
android:layout_width="60dp"
|
android:layout_width="60dp"
|
||||||
android:layout_height="80dp"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
app:backgroundImage="@color/call_buttons_background"
|
app:backgroundImage="@color/call_buttons_background"
|
||||||
@ -167,7 +166,7 @@
|
|||||||
<com.facebook.drawee.view.SimpleDraweeView
|
<com.facebook.drawee.view.SimpleDraweeView
|
||||||
android:id="@+id/call_control_camera"
|
android:id="@+id/call_control_camera"
|
||||||
android:layout_width="60dp"
|
android:layout_width="60dp"
|
||||||
android:layout_height="80dp"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
android:alpha="0.7"
|
android:alpha="0.7"
|
||||||
@ -178,7 +177,7 @@
|
|||||||
<com.facebook.drawee.view.SimpleDraweeView
|
<com.facebook.drawee.view.SimpleDraweeView
|
||||||
android:id="@+id/call_control_microphone"
|
android:id="@+id/call_control_microphone"
|
||||||
android:layout_width="60dp"
|
android:layout_width="60dp"
|
||||||
android:layout_height="80dp"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
android:alpha="0.7"
|
android:alpha="0.7"
|
||||||
@ -189,7 +188,7 @@
|
|||||||
<com.facebook.drawee.view.SimpleDraweeView
|
<com.facebook.drawee.view.SimpleDraweeView
|
||||||
android:id="@+id/callControlHangupView"
|
android:id="@+id/callControlHangupView"
|
||||||
android:layout_width="60dp"
|
android:layout_width="60dp"
|
||||||
android:layout_height="80dp"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginEnd="40dp"
|
android:layout_marginEnd="40dp"
|
||||||
app:backgroundImage="@color/nc_darkRed"
|
app:backgroundImage="@color/nc_darkRed"
|
||||||
|
@ -59,4 +59,5 @@
|
|||||||
<dimen name="default_login_width">400dp</dimen>
|
<dimen name="default_login_width">400dp</dimen>
|
||||||
|
|
||||||
<dimen name="call_grid_item_min_height">180dp</dimen>
|
<dimen name="call_grid_item_min_height">180dp</dimen>
|
||||||
|
<dimen name="call_controls_height">110dp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user