Я разрабатываю приложение, и я сделал ниже показанный макет:Как принести ImageView через CardView? Пожалуйста, смотрите подробности
Существует CircleImageView
и CardView
.
Вот код XML:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.playrapp.playr.Profile"
tools:showIn="@layout/activity_profile">
<android.support.v7.widget.CardView
android:id="@+id/profileCard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
app:contentPadding="10dp">
</android.support.v7.widget.CardView>
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/userImageProfile"
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_marginTop="50dp"
android:src="@mipmap/ic_launcher"
android:layout_centerHorizontal="true"/>
</RelativeLayout>
Здесь cardview находится над ImageView. Я хочу, чтобы изображение было просмотрено. Как я могу это сделать?
Пожалуйста, дайте мне знать.
обернуть его в соске LinearLayout –