我想添加分隔線(水平或垂直兩個視圖之間的平滑透明線)我怎麼能實現這裏是我的示例code.i需要添加水平線用戶名和密碼(水平)之間的並且還包括用戶圖標和用戶名提示(垂直地)我想添加分隔線在Android應用程序中的兩個視圖
<LinearLayout
android:gravity="top"
android:divider="?android:dividerHorizontal"
android:layout_width="300dp"
android:layout_marginLeft="20dp"
android:layout_height="wrap_content"
android:id="@+id/liner"
android:orientation="vertical">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/user"
android:id="@+id/username"
android:textColor="#bbc"
/>
<EditText
android:layout_width="300dp"
android:layout_height="wrap_content"
android:hint="@string/usr_name"
android:textColorHint="#bbc"
android:backgroundTint="@android:color/transparent"
android:textColor="@android:color/white"/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/paswd"
android:id="@+id/password"
android:textColor="#bbc"
/>
<EditText
android:layout_width="300dp"
android:layout_height="wrap_content"
android:hint="@string/passwd"
android:textColorHint="#bbc"
android:backgroundTint="@android:color/transparent"
android:textColor="@android:color/white"/>
</LinearLayout>
</LinearLayout>
之前問出這樣的問題 – akhilesh0707
請[參考這個問題(https://stackoverflow.com/questions/5049852/android-drawing-separator-divider-line-in-請做谷歌佈局) –
[Android Layout Drawing Separator/Divider Line in Layout?](https://stackoverflow.com/questions/5049852/android-drawing-separator-divider-line-in-layout) – akhilesh0707