1
A
回答
1
使用此代码:
<FrameLayout
android:gravity="center"
android:layout_centerInParent="true"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:paddingBottom="24.0dip"
android:paddingLeft="0.5dip"
android:paddingRight="0.5dip"
android:paddingTop="35.0dip"
android:background="#ff26a69a"
xmlns:android="http://schemas.android.com/apk/res/android">
<de.hdodenhof.circleimageview.CircleImageView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/profile_image"
android:layout_width="178.0dip"
android:layout_height="178.0dip"
android:src="@drawable/ic_settings_profile"
app:civ_border_width="2dp"
app:civ_border_color="#FF000000"/>
<ProgressBar
style="?android:attr/progressBarStyleInverse"
android:id="@+id/change_photo_progress"
android:layout_gravity="center"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:visibility="gone" />
<ImageButton
style="@style/ActionBarButtonStyle"
android:background="@drawable/input_circle"
android:elevation="2.0dip"
android:id="@+id/change_photo_btn"
android:layout_gravity="bottom|center|right"
android:layout_height="52.0dip"
android:layout_marginBottom="2.0dip"
android:layout_width="52.0dip"
android:src="@drawable/ic_cam_white" />
</FrameLayout>
在绘制文件夹
input_circle.xml
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/input_circle_pressed" />
<item android:state_focused="true" android:state_enabled="true" android:drawable="@drawable/input_circle_pressed" />
<item android:drawable="@drawable/input_circle_normal" />
</selector>
输出:
0
添加的TextView的imageview的
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="@+id/linearImage"
android:layout_weight="1"
android:gravity="center"
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
android:layout_marginTop="20dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/imgtimer"
android:layout_gravity="center"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:scaleType="fitCenter"
android:src="@drawable/downcounter"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_gravity="center"
android:gravity="center"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:layout_marginTop="10dp"
android:layout_centerHorizontal="true">
<TextView
android:id="@+id/txthourr"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLength="2"
android:text="00"
android:layout_marginRight="3dp"
android:textColor="@color/white"
android:paddingRight="2dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="48dp"
/>
<TextView
android:id="@+id/txtcolon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLength="1"
android:text=":"
android:textColor="@color/white"
android:textSize="40dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_marginBottom="2dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/txtminutee"
android:maxLength="2"
android:textSize="48dp"
android:layout_marginLeft="4dp"
android:textColor="@color/white"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="30"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/txtsecc"
android:maxLength="2"
android:layout_marginLeft="4dp"
android:textSize="26dp"
android:textColor="@color/white"
android:layout_marginTop="8dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="00"
/>
</LinearLayout>
</FrameLayout>
0
里面试试这个,alignEnd,alignRight,alignBottom小图像的大图像,并调整边距尺寸按你的图片。
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_gravity="right|center_vertical">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/bigImage"
android:layout_centerHorizontal="true"
android:layout_marginTop="100dp"
android:layout_width="140dp"
android:layout_height="140dp"
android:background="@drawable/back_image"/>
<ImageButton
android:id="@+id/small_image"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignEnd="@+id/big_mage"
android:layout_alignRight="@+id/big_image"
android:layout_alignBottom="@+id/big_image"
android:background="@drawable/small_image"
android:text="" />
</RelativeLayout>
相关问题
- 1. 改变一个ImageButton的图像编程
- 2. 图像在另一个图像
- 3. 在另一个图像
- 4. 的ImageButton在透明图像
- 5. 在Processing中在另一个图像上添加一个图像?
- 6. 从另一个图像中减去另一个图像
- 7. 在另一个图像上重叠一个图像
- 8. 在另一个图像下旋转一个图像
- 9. 在css中覆盖一个图像与另一个图像
- 10. 将一个图像放在android中的另一个图像上
- 11. Android:在另一个图像上放置一个图像
- 12. 在python(PIL)中将另一个图像放在另一个图像的上方,然后将另一个图像隐藏在另一个内部
- 13. 的ImageButton改变另一个的ImageButton的图像会导致不期望的循环
- 14. 改变图像到另一个图像
- 15. 将图像移到另一个图像
- 16. 多个图像加载在另一个
- 17. 悬停在图像上,更改另一个图像 - 多个第一图像
- 18. 加载另一个图像
- 19. Imagebutton不显示图像
- 20. 适合ImageButton的图像
- 21. 的ImageButton不改变图像
- 22. ImageButton不显示图像
- 23. Android ImageButton图像缩放
- 24. 的ImageButton图像不调整
- 25. 更改ImageButton的图像
- 26. 带外部图像的ImageButton?
- 27. 更改imagebutton的图像
- 28. System.Web.UI.WebControls.Image/ImageButton不显示图像
- 29. Android/Monodroid图像比imagebutton小
- 30. 图像不是ImageButton的asp.net
使用'RelativeLayout'并为图片设置negetive margin –
我会尽力,谢谢你的回答。 – Jorge
@Jorge在下面看到我的答案。 – Ironman