1
如何在工具栏中放置圆形图像?工具栏上的Circle ImageView
我可以原生方式
toolbar = (Toolbar)findViewById(R.id.toolbarConversa);
toolbar.setLogo(imageDrawable);
toolbar.setTitle(title);
setSupportActionBar(toolbar);
XML这里
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbarPrincipal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
<de.hdodenhof.circleimageview.CircleImageView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/imageListaConversaToolbar"
android:padding="5dp"
android:layout_width="10mm"
android:layout_height="10mm"
android:layout_gravity="left"
app:srcCompat="@android:drawable/sym_def_app_icon" />
使用Facebook的图片库壁画。 –