「新しい」Google Plusアプリのように、Android 4.1以降のAndroid Lのこの丸いボタンを使用する方法を探しています。
バックポート ライブラリなどはありますか (Android l の設計機能がさらに追加されている可能性があります)。
私はすでに google.com/design -> ressources と developer.android.com を見てきました
1 に答える
2
これはあなたが望むものの単なるサンプルです(私は思う)
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.sockettest.MainActivity"
tools:ignore="MergeRootFrame" >
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="250dp"
android:layout_height="100dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:background="#ccc"
android:orientation="vertical" >
</LinearLayout>
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/linearLayout1"
android:src="@drawable/ic_launcher"
android:layout_marginLeft="-20dp" />
</RelativeLayout>
レイアウトの左imageView
から右に合わせてから、マイナスマージン ( -20 ) を設定します。
ただし、注意しimageView
てください。レイアウトよりも低くする必要があります (imageView
結果を表示するには、レイアウトを入れ替えることができます)。
于 2014-06-28T10:48:12.310 に答える