2016-04-26 11 views
-2

Ich bin neu in Android und ich arbeite an einer App, die die Schaltflächen auf diese Weise zeigen muss.Schaltfläche Opazität in horizontaler Scroll-Ansicht

buttons_img

habe ich HorizontalScrollView diese Aktion zu demonstrieren, aber ich weiß nicht, wie transparente Tasten für Schritt wie im Bild Schritt zu machen.

Hilfe wäre willkommen.

+1

was Sie versucht haben? –

+0

Ich arbeite gerade an HorizontalScrollView, aber ich muss transparent sein. – Alek

+0

Sie können die aktuelle Ansicht nicht ändern andere Ansicht, so dass Sie auf der Mitte arbeiten müssen –

Antwort

0
<HorizontalScrollView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:scrollbarSize="0dp" 
    > 

    <LinearLayout 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:orientation="horizontal" > 

     <LinearLayout 
      android:padding="16dp" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:gravity="center" 
      android:orientation="vertical"> 
      <ImageView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:src="@mipmap/ic_launcher" /> 
      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="Learn" /> 
     </LinearLayout> 

     <LinearLayout 
      android:padding="16dp" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:gravity="center" 
      android:orientation="vertical"> 
      <ImageView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:src="@mipmap/ic_launcher" /> 
      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="Android" /> 
     </LinearLayout> 

     <LinearLayout 
      android:padding="16dp" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:gravity="center" 
      android:orientation="vertical"> 
      <ImageView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:src="@mipmap/ic_launcher" /> 
      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="Step" /> 
     </LinearLayout> 

Verwandte Themen