Reverted layout of app details to what it was before.
This commit is contained in:
parent
a030c25f4f
commit
1d4581a78e
@ -4,7 +4,6 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:padding="5dp"
|
|
||||||
android:baselineAligned="false"
|
android:baselineAligned="false"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
@ -14,12 +13,27 @@
|
|||||||
android:layout_weight="0.5"
|
android:layout_weight="0.5"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<fragment
|
<LinearLayout
|
||||||
android:id="@+id/fragment_app_summary"
|
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:name="org.fdroid.fdroid.AppDetails$AppDetailsSummaryFragment"
|
android:orientation="vertical"
|
||||||
tools:layout="@layout/app_details_summary"/>
|
android:padding="5dp">
|
||||||
|
|
||||||
|
<fragment
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/landscape_header"
|
||||||
|
android:name="org.fdroid.fdroid.AppDetails$AppDetailsHeaderFragment"
|
||||||
|
tools:layout="@layout/app_details_header"/>
|
||||||
|
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/fragment_app_summary"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:name="org.fdroid.fdroid.AppDetails$AppDetailsSummaryFragment"
|
||||||
|
tools:layout="@layout/app_details_summary"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
|
@ -1,74 +1,96 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:baselineAligned="false"
|
android:paddingTop="5dp"
|
||||||
android:padding="5dp" >
|
android:paddingBottom="5dp"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:paddingRight="10dp"
|
||||||
|
>
|
||||||
|
|
||||||
<TextView android:id="@+id/version"
|
<RelativeLayout
|
||||||
android:textStyle="bold"
|
android:layout_width="fill_parent"
|
||||||
android:maxLines="2"
|
android:layout_height="wrap_content"
|
||||||
android:ellipsize="end"
|
android:baselineAligned="false" >
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textSize="18sp" />
|
|
||||||
|
|
||||||
<TextView android:id="@+id/status"
|
<TextView android:id="@+id/version"
|
||||||
android:textSize="13sp"
|
android:textStyle="bold"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:layout_below="@id/version"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="wrap_content" />
|
android:textSize="18sp"
|
||||||
|
tools:text="Version 1.0 (as if!)"/>
|
||||||
|
|
||||||
<TextView android:id="@+id/added"
|
<TextView android:id="@+id/status"
|
||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
android:layout_below="@id/status"
|
android:maxLines="2"
|
||||||
android:layout_height="wrap_content"
|
android:ellipsize="end"
|
||||||
android:layout_width="wrap_content" />
|
android:layout_below="@id/version"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
tools:text="Installed" />
|
||||||
|
|
||||||
<TextView android:id="@+id/buildtype"
|
<TextView android:id="@+id/added"
|
||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_below="@id/status"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
tools:text="Added on 1/1/2050" />
|
||||||
android:layout_marginBottom="4sp" />
|
|
||||||
|
|
||||||
<TextView android:id="@+id/size"
|
<TextView android:id="@+id/buildtype"
|
||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
android:layout_below="@id/buildtype"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_marginBottom="4sp"
|
||||||
android:layout_marginBottom="4sp" />
|
tools:text="source" />
|
||||||
|
|
||||||
<TextView android:id="@+id/api"
|
<TextView android:id="@+id/size"
|
||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
android:layout_below="@id/buildtype"
|
android:layout_below="@id/buildtype"
|
||||||
android:layout_toLeftOf="@id/size"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_toStartOf="@id/size"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_marginRight="16sp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="16sp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_marginBottom="4sp"
|
||||||
android:layout_width="wrap_content" />
|
tools:text="12mb" />
|
||||||
|
|
||||||
<TextView android:id="@+id/nativecode"
|
<TextView android:id="@+id/api"
|
||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
android:layout_below="@id/size"
|
android:layout_below="@id/buildtype"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_toLeftOf="@id/size"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_toStartOf="@id/size"
|
||||||
android:layout_height="wrap_content"
|
android:layout_marginRight="16sp"
|
||||||
android:layout_width="wrap_content" />
|
android:layout_marginEnd="16sp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
tools:text=""
|
||||||
|
tools:visible="gone" />
|
||||||
|
|
||||||
<TextView android:id="@+id/incompatible_reasons"
|
<TextView android:id="@+id/nativecode"
|
||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
android:layout_below="@id/added"
|
android:layout_below="@id/size"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="wrap_content" />
|
android:layout_width="wrap_content"
|
||||||
|
tools:text=""
|
||||||
|
tools:visible="gone" />
|
||||||
|
|
||||||
</RelativeLayout>
|
<TextView android:id="@+id/incompatible_reasons"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:layout_below="@id/added"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
tools:text=""
|
||||||
|
tools:visible="gone" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
@ -1,10 +1,26 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout
|
<LinearLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:padding="5dp">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="4dp"
|
||||||
|
android:paddingLeft="6dp"
|
||||||
|
android:paddingRight="6dp">
|
||||||
|
|
||||||
|
<fragment
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/header"
|
||||||
|
android:name="org.fdroid.fdroid.AppDetails$AppDetailsHeaderFragment"
|
||||||
|
tools:layout="@layout/app_details_header" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/fragment_app_list"
|
android:id="@+id/fragment_app_list"
|
||||||
@ -13,4 +29,4 @@
|
|||||||
android:name="org.fdroid.fdroid.AppDetails$AppDetailsListFragment"
|
android:name="org.fdroid.fdroid.AppDetails$AppDetailsListFragment"
|
||||||
tools:layout="@android:layout/list_content"/>
|
tools:layout="@android:layout/list_content"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</LinearLayout>
|
||||||
|
98
res/layout/app_details_header.xml
Normal file
98
res/layout/app_details_header.xml
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout
|
||||||
|
xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/icon_and_title"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:baselineAligned="false"
|
||||||
|
android:paddingTop="2dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/icon"
|
||||||
|
android:contentDescription="@string/app_icon"
|
||||||
|
android:layout_width="56dp"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:padding="4dp"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
tools:src="@drawable/ic_launcher"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_toRightOf="@id/icon"
|
||||||
|
android:layout_toEndOf="@id/icon"
|
||||||
|
android:baselineAligned="false"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:paddingRight="5dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/license"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:layout_marginLeft="6sp"
|
||||||
|
android:layout_marginStart="6sp"
|
||||||
|
android:textSize="12sp"
|
||||||
|
tools:text="GPLv3+"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:textSize="17sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:gravity="start"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:layout_toLeftOf="@id/license"
|
||||||
|
android:layout_toStartOf="@id/license"
|
||||||
|
tools:text="F-Droid"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/categories"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginLeft="6sp"
|
||||||
|
android:layout_marginStart="6sp"
|
||||||
|
android:layout_below="@id/title"
|
||||||
|
android:textSize="12sp"
|
||||||
|
tools:text="System"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/status"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:gravity="start"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:layout_toLeftOf="@id/categories"
|
||||||
|
android:layout_toStartOf="@id/categories"
|
||||||
|
android:layout_below="@id/title"
|
||||||
|
tools:text="Installed"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
@ -1,85 +1,26 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout
|
<LinearLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
android:paddingTop="4dp"
|
android:paddingTop="4dp"
|
||||||
android:paddingBottom="8dp"
|
android:paddingBottom="8dp"
|
||||||
android:baselineAligned="false"
|
android:paddingLeft="5dp"
|
||||||
android:orientation="vertical" >
|
android:paddingRight="5dp">
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/icon"
|
|
||||||
android:contentDescription="@string/app_icon"
|
|
||||||
android:layout_width="56dp"
|
|
||||||
android:layout_height="56dp"
|
|
||||||
android:padding="4dp"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
tools:src="@drawable/ic_launcher"
|
|
||||||
android:scaleType="fitCenter"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/status"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_toRightOf="@id/icon"
|
|
||||||
android:layout_toEndOf="@id/icon"
|
|
||||||
android:layout_alignBottom="@id/icon"
|
|
||||||
android:paddingLeft="4dp"
|
|
||||||
tools:text="Installed"
|
|
||||||
android:textSize="13sp" android:layout_marginBottom="4dp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/title"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:singleLine="false"
|
|
||||||
tools:text="F-Droid"
|
|
||||||
android:textSize="18sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:paddingLeft="4dp"
|
|
||||||
android:layout_toRightOf="@id/icon"
|
|
||||||
android:layout_above="@id/status" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/categories"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_alignBottom="@id/icon"
|
|
||||||
android:paddingLeft="4dp"
|
|
||||||
tools:text="System, Internet"
|
|
||||||
android:textSize="13sp" android:layout_marginBottom="4dp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/license"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_above="@id/categories"
|
|
||||||
android:paddingRight="4dp"
|
|
||||||
tools:text="GPLv3+"
|
|
||||||
android:textSize="13sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/summary"
|
android:id="@+id/summary"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/icon"
|
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
tools:text="Application manager" />
|
tools:text="Application manager"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/appid"
|
android:id="@+id/appid"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/summary"
|
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
tools:text="org.fdroid.fdroid" />
|
tools:text="org.fdroid.fdroid" />
|
||||||
|
|
||||||
@ -87,14 +28,12 @@
|
|||||||
android:id="@+id/signature"
|
android:id="@+id/signature"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/appid"
|
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/antifeatures"
|
android:id="@+id/antifeatures"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/signature"
|
|
||||||
android:layout_marginTop="6sp"
|
android:layout_marginTop="6sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textColor="#ff0000"
|
android:textColor="#ff0000"
|
||||||
@ -104,7 +43,6 @@
|
|||||||
android:id="@+id/description"
|
android:id="@+id/description"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/antifeatures"
|
|
||||||
android:layout_marginTop="8sp"
|
android:layout_marginTop="8sp"
|
||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
android:singleLine="false"
|
android:singleLine="false"
|
||||||
@ -125,7 +63,6 @@ Changelog" />
|
|||||||
android:id="@+id/permissions"
|
android:id="@+id/permissions"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/description"
|
|
||||||
android:layout_marginTop="8sp"
|
android:layout_marginTop="8sp"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
@ -135,7 +72,6 @@ Changelog" />
|
|||||||
android:id="@+id/permissions_list"
|
android:id="@+id/permissions_list"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/permissions"
|
|
||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
android:singleLine="false"
|
android:singleLine="false"
|
||||||
tools:text=" * Full network access
|
tools:text=" * Full network access
|
||||||
@ -151,4 +87,4 @@ Changelog" />
|
|||||||
* Full permission to all device features and storage
|
* Full permission to all device features and storage
|
||||||
* Test access to protected storage" />
|
* Test access to protected storage" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</LinearLayout>
|
||||||
|
@ -1076,19 +1076,10 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
|
|||||||
public static class AppDetailsSummaryFragment extends Fragment {
|
public static class AppDetailsSummaryFragment extends Fragment {
|
||||||
|
|
||||||
protected final Preferences prefs;
|
protected final Preferences prefs;
|
||||||
protected final DisplayImageOptions displayImageOptions;
|
|
||||||
private AppDetailsData data;
|
private AppDetailsData data;
|
||||||
|
|
||||||
public AppDetailsSummaryFragment() {
|
public AppDetailsSummaryFragment() {
|
||||||
prefs = Preferences.get();
|
prefs = Preferences.get();
|
||||||
displayImageOptions = new DisplayImageOptions.Builder()
|
|
||||||
.cacheInMemory(true)
|
|
||||||
.cacheOnDisk(true)
|
|
||||||
.imageScaleType(ImageScaleType.NONE)
|
|
||||||
.showImageOnLoading(R.drawable.ic_repo_app_default)
|
|
||||||
.showImageForEmptyUri(R.drawable.ic_repo_app_default)
|
|
||||||
.bitmapConfig(Bitmap.Config.RGB_565)
|
|
||||||
.build();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -1129,21 +1120,6 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
|
|||||||
|
|
||||||
private void setupView(View view) {
|
private void setupView(View view) {
|
||||||
|
|
||||||
// Set the icon...
|
|
||||||
ImageView iv = (ImageView) view.findViewById(R.id.icon);
|
|
||||||
ImageLoader.getInstance().displayImage(getApp().iconUrl, iv, displayImageOptions);
|
|
||||||
|
|
||||||
// Set the title and other header details...
|
|
||||||
TextView tv = (TextView) view.findViewById(R.id.title);
|
|
||||||
tv.setText(getApp().name);
|
|
||||||
tv = (TextView) view.findViewById(R.id.license);
|
|
||||||
tv.setText(getApp().license);
|
|
||||||
|
|
||||||
if (getApp().categories != null) {
|
|
||||||
tv = (TextView) view.findViewById(R.id.categories);
|
|
||||||
tv.setText(getApp().categories.toString().replaceAll(",", ", "));
|
|
||||||
}
|
|
||||||
|
|
||||||
TextView description = (TextView) view.findViewById(R.id.description);
|
TextView description = (TextView) view.findViewById(R.id.description);
|
||||||
Spanned desc = Html.fromHtml(getApp().description, null, new Utils.HtmlTagHandler());
|
Spanned desc = Html.fromHtml(getApp().description, null, new Utils.HtmlTagHandler());
|
||||||
description.setMovementMethod(LinkMovementMethod.getInstance());
|
description.setMovementMethod(LinkMovementMethod.getInstance());
|
||||||
@ -1244,19 +1220,10 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
|
|||||||
public void updateViews(View view) {
|
public void updateViews(View view) {
|
||||||
|
|
||||||
if (view == null) {
|
if (view == null) {
|
||||||
Log.e(TAG, "AppDetailsSummaryFragment.refreshApkList - view == null. Oops.");
|
Log.e(TAG, "AppDetailsSummaryFragment.updateViews(): view == null. Oops.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TextView statusView = (TextView) view.findViewById(R.id.status);
|
|
||||||
if (getApp().isInstalled()) {
|
|
||||||
statusView.setText(getString(R.string.details_installed, getApp().installedVersionName));
|
|
||||||
NfcBeamManager.setAndroidBeam(getActivity(), getApp().id);
|
|
||||||
} else {
|
|
||||||
statusView.setText(getString(R.string.details_notinstalled));
|
|
||||||
NfcBeamManager.disableAndroidBeam(getActivity());
|
|
||||||
}
|
|
||||||
|
|
||||||
TextView signatureView = (TextView) view.findViewById(R.id.signature);
|
TextView signatureView = (TextView) view.findViewById(R.id.signature);
|
||||||
if (prefs.expertMode() && getInstalledSignature() != null) {
|
if (prefs.expertMode() && getInstalledSignature() != null) {
|
||||||
signatureView.setVisibility(View.VISIBLE);
|
signatureView.setVisibility(View.VISIBLE);
|
||||||
@ -1268,6 +1235,86 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class AppDetailsHeaderFragment extends Fragment {
|
||||||
|
|
||||||
|
private AppDetailsData data;
|
||||||
|
protected final Preferences prefs;
|
||||||
|
protected final DisplayImageOptions displayImageOptions;
|
||||||
|
|
||||||
|
public AppDetailsHeaderFragment() {
|
||||||
|
prefs = Preferences.get();
|
||||||
|
displayImageOptions = new DisplayImageOptions.Builder()
|
||||||
|
.cacheInMemory(true)
|
||||||
|
.cacheOnDisk(true)
|
||||||
|
.imageScaleType(ImageScaleType.NONE)
|
||||||
|
.showImageOnLoading(R.drawable.ic_repo_app_default)
|
||||||
|
.showImageForEmptyUri(R.drawable.ic_repo_app_default)
|
||||||
|
.bitmapConfig(Bitmap.Config.RGB_565)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
private App getApp() {
|
||||||
|
return data.getApp();
|
||||||
|
}
|
||||||
|
|
||||||
|
private ApkListAdapter getApks() {
|
||||||
|
return data.getApks();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
View view = inflater.inflate(R.layout.app_details_header, container, false);
|
||||||
|
setupView(view);
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAttach(Activity activity) {
|
||||||
|
super.onAttach(activity);
|
||||||
|
data = (AppDetailsData)activity;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupView(View view) {
|
||||||
|
|
||||||
|
// Set the icon...
|
||||||
|
ImageView iv = (ImageView) view.findViewById(R.id.icon);
|
||||||
|
ImageLoader.getInstance().displayImage(getApp().iconUrl, iv, displayImageOptions);
|
||||||
|
|
||||||
|
// Set the title and other header details...
|
||||||
|
TextView tv = (TextView) view.findViewById(R.id.title);
|
||||||
|
tv.setText(getApp().name);
|
||||||
|
tv = (TextView) view.findViewById(R.id.license);
|
||||||
|
tv.setText(getApp().license);
|
||||||
|
|
||||||
|
if (getApp().categories != null) {
|
||||||
|
tv = (TextView) view.findViewById(R.id.categories);
|
||||||
|
tv.setText(getApp().categories.toString().replaceAll(",", ", "));
|
||||||
|
}
|
||||||
|
|
||||||
|
updateViews(view);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
updateViews(getView());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateViews(View view) {
|
||||||
|
|
||||||
|
TextView statusView = (TextView) view.findViewById(R.id.status);
|
||||||
|
if (getApp().isInstalled()) {
|
||||||
|
statusView.setText(getString(R.string.details_installed, getApp().installedVersionName));
|
||||||
|
NfcBeamManager.setAndroidBeam(getActivity(), getApp().id);
|
||||||
|
} else {
|
||||||
|
statusView.setText(getString(R.string.details_notinstalled));
|
||||||
|
NfcBeamManager.disableAndroidBeam(getActivity());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public static class AppDetailsListFragment extends ListFragment {
|
public static class AppDetailsListFragment extends ListFragment {
|
||||||
|
|
||||||
private final String SUMMARY_TAG = "summary";
|
private final String SUMMARY_TAG = "summary";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user