私はアクションバーでbutton
セーブで追加したいが、それはaction bar
下に示します。のxmlレイアウト(アクションバーにあるボタンやアイコンを追加します)奇妙に見える
何が解決することが正しいのですか?どんな助けでも大歓迎です。あなたは、保存ボタンがアクションバーの下に配置されて見ることができるように
コード
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/black"
android:theme="@style/Theme.AppCompat"
android:minHeight="?attr/actionBarSize">
<LinearLayout
android:layout_width="wrap_content"
android:layout_gravity="right"
android:layout_height="match_parent">
<Button
android:id="@+id/save"
android:text="SAVE"
android:layout_width="wrap_content"
android:background="#000"
android:textColor="#fff"
android:layout_height="wrap_content"
android:textSize="16dp" />
</LinearLayout>
</android.support.v7.widget.Toolbar>
<ImageView
android:layout_marginLeft="50dp"
android:layout_marginTop="20dp"
android:background = "@drawable/img_receipt"
android:src="@drawable/upload"
android:scaleType="fitXY"
android:layout_width="270dp"
android:layout_height="290dp"
android:id="@+id/image" />
<TextView
android:layout_marginLeft="15dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Add a description"
android:textColor="@color/black"
android:textStyle="bold"
android:layout_marginTop="40dp"
android:id="@+id/textView"
android:layout_below="@+id/image"
/>
<EditText
android:layout_marginLeft="5dp"
android:layout_width="350dp"
android:paddingBottom="75dp"
android:paddingLeft="10dp"
android:layout_height="120dp"
android:hint="Add a description"
android:textColor="@color/black"
android:background="@drawable/roundedcorner_edittext"
android:layout_marginTop="80dp"
android:layout_below="@+id/image"
android:id="@+id/editText" />
</RelativeLayout>
は
をスクリーンショット。私は健康的なアプリのタイトルの横にそれを置いて欲しい。あなたはそのようなアクションバーのボタンを追加することができます
しかし、私はアクションバーではなく、あなたがボタンlike..androidのIMGを使用することができます –
任意のアイコンを 'button'を持つようにしたい.. =「描画可能/ you_resourse_here @」アイコンと、それはボタンのように見えるともなりますボタンとして機能する –
ありがとう、私はそれを自分で解決することができます –