0
のエッジでImageViewの: imageview centeredアンドロイド - センター私はConstraintLayoutを使用していますが、私は、この画像のようなレイアウトの端にImageViewのを中心にしたいレイアウト
をどのように標高を使用せずにConstraintLayoutを使用することによって、これを達成することができます(私はLollipop以前のデバイスの高度をどう扱うかわかりません)。ここで
は、これまでの私のコードです:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="300dp"
app:behavior_hideable="false"
app:behavior_peekHeight="190dp"
android:clickable="true"
android:focusable="true"
android:background="#eee"
app:layout_behavior="android.support.design.widget.BottomSheetBehavior"
android:id="@+id/main_ride_finished_container"
>
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/main_driver_enroute_BS_driverImage"
android:layout_width="70dp"
android:layout_height="70dp"
android:src="@color/colorPrimary"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:elevation="3dp"
/>
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="35dp"
android:background="#FFFFFF"
>
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
をコードを投稿してみてください[これ](http://saulmm.github.io/mastering-coordinator) [this](https://github.com/saulmm/CoordinatorBehaviorExample/blob/master/app/src/main/res/layout/activity_main.xml)に移動します。 – ZeroOne
をusin午前のコードサンプルを追加し、ここでakhilesh0707 @ –