私はTextViewとImageViewをCardViewに持っています。
TextViewに1つ問題があります。
TextViewのテキストがCardViewの長さよりも長い場合、ImageViewに対して表示されますが、これは必要ありません。同じ行のtextViewの横にImageViewを追加する
この写真:
テキストがImageIiewに触れると、それはテキストの継続を示すため...
を示しているので、私はそれをしたいです。
row.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_margin="4dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/txt_file_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"/>
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_delete_forever_red_500_24dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"/>
</RelativeLayout>
</android.support.v7.widget.CardView>
これは私が何をしたいのスクリーンショットです:
drawableleftを追加します(描画イメージを入れて)、あなたが何をしたいあなたのTextView –
ショーのスクリーンショットでパディングdrawablepaddingを入れてみてください。 – Ironman
@アイロンマン私の目標からスクリーンショットを追加します。 –