BobStore/res/layout/applistitem.xml
Peter Serwylo ae9cb5b89b Beginnings of an implementation for Swap.
The Fragments and an Activity which tie all of the swap views together
has begun. The first bit of implementation is to get the current
wifi network displayed, which worked out alright.

This commit contains a lot of theme related stuff, particularly
involving taking assets from carries mockups and making them suitable
to use as drawables. The process for doing this is a story for another
day, but I'll document it and put it on the wiki in the future. carrie
showed me a script that a mate of hers used on another project, and
I've adapted it a little to make it work nicely here (note - it isn't
in this commit).

The button is blue, and always shown with associated text in the
ActionBar. This required a custom drawable which was set as the
background in the styles.xml.
2014-10-22 18:01:24 +10:30

109 lines
3.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:baselineAligned="false"
xmlns:tools="http://schemas.android.com/tools" >
<!-- Actual icon size is dependent on preferences and set in
AppListAdapater.java:layoutIcon() -->
<ImageView
android:id="@+id/icon"
android:contentDescription="@string/app_icon"
android:layout_width="48dip"
android:layout_height="48dip"
android:layout_gravity="center_vertical"
android:scaleType="fitCenter"
tools:src="@drawable/ic_launcher" />
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:paddingLeft="?attr/listPreferredItemPaddingLeft"
android:paddingRight="?attr/listPreferredItemPaddingRight"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:layout_gravity="center_vertical"
android:baselineAligned="false" >
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:layout_marginBottom="3dp" >
<TextView android:id="@+id/name"
android:textSize="17sp"
android:textStyle="bold"
android:singleLine="true"
android:ellipsize="end"
android:layout_weight="2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="start"
android:textAlignment="viewStart"
tools:text="F-Droid" />
<TextView android:id="@+id/status"
android:textSize="13sp"
android:singleLine="true"
android:ellipsize="end"
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="?attr/listPreferredItemPaddingLeft"
android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
android:layout_gravity="center_vertical"
android:gravity="end"
android:textAlignment="viewEnd"
tools:text="Installed"
/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
>
<TextView android:id="@+id/summary"
android:textSize="13sp"
android:singleLine="true"
android:ellipsize="end"
android:layout_weight="2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="start"
android:textAlignment="viewStart"
tools:text="Application manager"
/>
<TextView android:id="@+id/license"
android:textSize="12sp"
android:singleLine="true"
android:ellipsize="end"
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="?attr/listPreferredItemPaddingLeft"
android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
android:layout_gravity="center_vertical"
android:gravity="end"
android:textAlignment="viewEnd"
tools:text="GPLv3"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>