2014-07-09 4 views

답변

0

것은 이런 일을보십시오. 드로어 블에 대해 알파 (0 ~ 1)를 설정하고 상대 레이아웃을 사용하면됩니다.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:background="@android:color/darker_gray" > 

<ImageView 
    android:id="@+id/imageView1" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_alignParentRight="true" 
    android:layout_alignParentTop="true" 
    android:alpha="0.5" 
    android:src="@drawable/card_back" 
    android:tint="#00A7C0DC" /> 

<TextView 
    android:id="@+id/textView1" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_alignLeft="@+id/imageView1" 
    android:layout_alignParentTop="true" 
    android:layout_marginLeft="30dp" 
    android:layout_marginTop="27dp" 
    android:text="Back Face" 
    android:textAppearance="?android:attr/textAppearanceLarge" 
    android:textColor="@color/white" 
    android:textSize="25sp" 
    android:textStyle="bold" /> 

<ImageView 
    android:id="@+id/imageView2" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_alignParentBottom="true" 
    android:layout_alignParentLeft="true" 
    android:layout_marginBottom="15dp" 
    android:layout_marginLeft="18dp" 
    android:src="@drawable/card_back" /> 

</RelativeLayout> 

스냅 샷을 편집 할 수 있습니다. 당신만큼 좋지는 않지만 괜찮아 보입니다.

참고 두 번째 이미지는 단지 비교를위한 것입니다. enter image description here

0

내가 각 항목에 대해이 계층 구조를 사용합니다 :

<FrameLayout> (with the image as background) 
    <FrameLayout> (with half transparent color as background) 
     <ImageButton/> (with layout_gravity="bottom|right") 
     <LinearLayout> (with orientation="vertical") 
      <TextView/> (title) 
      <TextView/> (body) 
     </LinearLayout> 
    </FrameLayout> 
</FrameLayout> 
관련 문제