説明: レイアウトの境界にcircleImageViewを設定したいとします。私のcircleImageViewをアンドロイドのレイアウトの境界に設定するにはどうすればいいですか?
ここにレイアウトがありますが、レイアウトの境界線にcircleimageviewを設定したいxmlファイルを示します。ここで
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
tools:context="com.angelnx.angelnx.holidays.Registration">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_margin="25dp">
<ScrollView
android:fillViewport="true"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/viewA"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.8"
android:background="@color/login_header"
android:orientation="vertical">
<ImageView
android:id="@+id/symbol"
android:contentDescription="@null"
android:layout_width="fill_parent"
android:layout_height="100dp"
android:layout_gravity="center"
android:src="@drawable/ic_menu_camera"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="75dp"
android:text="@string/Holiday"
android:layout_marginTop="50dp"
android:layout_gravity="center_horizontal|bottom"
android:gravity="center"
android:layout_alignBottom="@+id/symbol"
android:textColor="@color/header_text"
android:textStyle="bold"
android:textSize="20sp"/>
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/circleView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/circularimage"/>
</RelativeLayout>
<LinearLayout
android:id="@+id/viewB"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="@color/fab_tint"
android:layout_weight="1"
android:orientation="vertical">
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">
<ImageView
android:contentDescription="@null"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:src="@drawable/ic_username"/>
<android.support.design.widget.TextInputLayout
android:id="@+id/input_layout_name"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/input_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:inputType="text"
android:paddingLeft="30dp"
android:hint="@string/hint_name" />
</android.support.design.widget.TextInputLayout>
</FrameLayout>
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">
<ImageView
android:contentDescription="@null"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:src="@drawable/ic_email" />
<android.support.design.widget.TextInputLayout
android:id="@+id/input_layout_email"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/input_email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:inputType="textEmailAddress"
android:paddingLeft="30dp"
android:hint="@string/hint_email" />
</android.support.design.widget.TextInputLayout>
</FrameLayout>
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">
<ImageView
android:contentDescription="@null"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:src="@drawable/lock_open" />
<android.support.design.widget.TextInputLayout
android:id="@+id/input_layout_password"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/input_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:inputType="textPassword"
android:paddingLeft="30dp"
android:hint="@string/hint_password" />
</android.support.design.widget.TextInputLayout>
</FrameLayout>
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="horizontal">
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/btn_select"
android:textAllCaps="false"
android:textSize="17sp"
android:background="@color/btn_start_color"
android:textColor="@color/text_white"/>
</FrameLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="bottom"
android:orientation="horizontal"
android:layout_margin="10dp">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<Button
android:id="@+id/btn_signup"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/btn_signup"
android:layout_weight="0.7"
android:background="@drawable/button_round"
android:textColor="@android:color/white"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
</LinearLayout>
は、私は、まさにこの
ようにしたいのデモ画像が出て解決するために私を助けて、くださいです。
**レイアウトの境界にcircleimageviewを設定したいです。あなたはどこでそれをしたいかを具体的に説明できますか? –
私のイメージを参照してください私は正確にそのようにしたい –
これらの答えを試してください... http://stackoverflow.com/questions/25127468/android-placing-imageview-on-overlap-between-layouts http://stackoverflow.com/質問/ 33864422/android-imageview-overlay-another-imageview –