Revision control
Copy as Markdown
<?xml version="1.0" encoding="utf-8"?>
<data>
<variable
name="login"
type="mozilla.components.concept.storage.Login" />
<variable
name="delegate"
type="org.mozilla.vrbrowser.ui.adapters.LoginsAdapter.Delegate" />
<variable
name="isHovered"
type="boolean" />
</data>
<RelativeLayout
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/saved_login_item_background_color"
android:padding="10dp"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical"
android:onClick="@{(view) -> delegate.onLoginSelected(view, login)}"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:soundEffectsEnabled="false"
android:addStatesFromChildren="true">
<LinearLayout
android:id="@+id/title_url"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:layout_toStartOf="@id/buttons_container"
android:gravity="center_vertical"
android:addStatesFromChildren="true">
<TextView
android:id="@+id/origin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="end"
android:paddingEnd="20dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:text="@{login.origin}"
android:textColor="@color/library_panel_title_text_color"
android:textSize="@dimen/settings_text_size"
android:textStyle="bold"
tools:text="origin" />
<TextView
android:id="@+id/url"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="end"
android:paddingEnd="20dp"
android:scrollHorizontally="true"
android:singleLine="true"
android:text="@{login.username}"
android:textColor="@color/library_panel_description_color"
android:textSize="@dimen/settings_text_size"
tools:text="username" />
</LinearLayout>
<LinearLayout
android:id="@+id/buttons_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_gravity="end"
android:orientation="horizontal"
app:visibleInvisible="@{isHovered}"
android:addStatesFromChildren="true">
<ImageView
android:id="@+id/trash"
android:layout_width="@dimen/library_item_row_height"
android:layout_height="@dimen/library_item_row_height"
android:layout_gravity="center_vertical|end"
android:padding="@dimen/library_icon_padding_max"
android:soundEffectsEnabled="false"
android:src="@drawable/ic_icon_trash"
android:tint="@color/library_panel_icon_color"
app:srcCompat="@drawable/ic_icon_trash" />
</LinearLayout>
</RelativeLayout>
</layout>