[short text][image1][image2]____________________________________
[this is a reallyyyyyyy.............y long text][image1][image2]
私は 3 つのビューを持っています: 可変サイズの 1 つの TextView と 2 つの小さな画像 (16 dp x 16 dp) で、画像が常に 16 dp x 16 dp として表示され、テキストが残りのスペースに表示され、長すぎる場合は省略されるようにレイアウトを実現したいと考えています。3 つのビューのグループはすべて左揃えで、互いに隣り合っている必要があります。
試みたアプローチ:
重みのない LinearLayout
欠点: TextView が大きい場合、ImageView は表示されません。
重み付き LinearLayout
欠点: ImageView は互いに隣接しなくなりましたが、重みの比率でスペースを占有します。
RelativeLayout - image2: alignParentBottom、image1: toLeftOf="image2"、テキスト: toLeftOf="image1"
欠点: すべての要素が右揃えになりました。
_ _ _ _ _ _ _ _ _ _ ____ [短いテキスト][画像1][画像2 ]
このようなレイアウトはどのように実現できますか? できればネストなしですか?
前もって感謝します!