【发布时间】:2016-04-20 14:27:36
【问题描述】:
我想用按钮在里面编辑照片来做 imageView 布局。
我想把图像作为 imageView 背景,但我不知道如何做半圆透明度和设置图标。
有什么想法吗?
更新
现在我有了这个。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="150dp"
android:layout_height="150dp"
android:background="@color/blue_bar">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/image"
android:scaleType="centerCrop"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@color/black"/>
<ImageButton
android:layout_alignStart="@+id/image"
android:layout_alignEnd="@+id/image"
android:src="@drawable/ic_edit_photo"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="#B3ffffff"/>
</RelativeLayout>
我可以将 imageButtons 背景做成半圆形吗?
【问题讨论】:
-
你可以使用 FrameLayout
标签: android layout imageview profile