Spacings after html lists are fixed. Better paddings.
This commit is contained in:
parent
31afbe0423
commit
ae95ef1b74
@ -2,6 +2,11 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="3dp"
|
||||||
|
android:paddingLeft="3dp"
|
||||||
|
android:paddingRight="3dp"
|
||||||
|
android:paddingBottom="10dp"
|
||||||
|
android:baselineAligned="false"
|
||||||
android:orientation="vertical" >
|
android:orientation="vertical" >
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -33,6 +38,7 @@
|
|||||||
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_marginTop="6sp"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
@ -47,6 +53,7 @@
|
|||||||
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_marginTop="6sp"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
|
@ -474,10 +474,16 @@ public class AppDetails extends ListActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void handleTag(boolean opening, String tag, Editable output,
|
public void handleTag(boolean opening, String tag, Editable output,
|
||||||
XMLReader reader) {
|
XMLReader reader) {
|
||||||
if (opening && tag.equals("ul")) {
|
if (tag.equals("ul")) {
|
||||||
|
if (opening)
|
||||||
listNum = -1;
|
listNum = -1;
|
||||||
|
else
|
||||||
|
output.append('\n');
|
||||||
} else if (opening && tag.equals("ol")) {
|
} else if (opening && tag.equals("ol")) {
|
||||||
|
if (opening)
|
||||||
listNum = 1;
|
listNum = 1;
|
||||||
|
else
|
||||||
|
output.append('\n');
|
||||||
} else if (tag.equals("li")) {
|
} else if (tag.equals("li")) {
|
||||||
if (opening) {
|
if (opening) {
|
||||||
if (listNum == -1) {
|
if (listNum == -1) {
|
||||||
@ -495,7 +501,7 @@ public class AppDetails extends ListActivity {
|
|||||||
}
|
}
|
||||||
Spanned desc = Html.fromHtml(
|
Spanned desc = Html.fromHtml(
|
||||||
app.detail_description, null, new HtmlTagHandler());
|
app.detail_description, null, new HtmlTagHandler());
|
||||||
tv.setText(desc.subSequence(0, desc.length() - 1));
|
tv.setText(desc.subSequence(0, desc.length() - 2));
|
||||||
|
|
||||||
tv = (TextView) infoView.findViewById(R.id.appid);
|
tv = (TextView) infoView.findViewById(R.id.appid);
|
||||||
if (pref_expert)
|
if (pref_expert)
|
||||||
@ -511,7 +517,7 @@ public class AppDetails extends ListActivity {
|
|||||||
|
|
||||||
CommaSeparatedList permsList = app.apks.get(0).detail_permissions;
|
CommaSeparatedList permsList = app.apks.get(0).detail_permissions;
|
||||||
if (permsList == null) {
|
if (permsList == null) {
|
||||||
tv.setText(getString(R.string.no_permissions) + '\n');
|
tv.setText(getString(R.string.no_permissions));
|
||||||
} else {
|
} else {
|
||||||
Iterator<String> permissions = permsList.iterator();
|
Iterator<String> permissions = permsList.iterator();
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
@ -525,6 +531,7 @@ public class AppDetails extends ListActivity {
|
|||||||
"Can't find permission '" + permissionName + "'");
|
"Can't find permission '" + permissionName + "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
sb.setLength(sb.length() - 1);
|
||||||
tv.setText(sb.toString());
|
tv.setText(sb.toString());
|
||||||
}
|
}
|
||||||
tv = (TextView) infoView.findViewById(R.id.permissions);
|
tv = (TextView) infoView.findViewById(R.id.permissions);
|
||||||
@ -540,9 +547,11 @@ public class AppDetails extends ListActivity {
|
|||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
for (String af : app.antiFeatures)
|
for (String af : app.antiFeatures)
|
||||||
sb.append("<li>"+titleAntiFeature(af)+": "+descAntiFeature(af)+"</li>");
|
sb.append("<li>"+titleAntiFeature(af)+": "+descAntiFeature(af)+"</li>");
|
||||||
tv.setText(Html.fromHtml(sb.toString(), null, new HtmlTagHandler()));
|
Spanned afs = Html.fromHtml(sb.toString(), null, new HtmlTagHandler());
|
||||||
|
tv.setText(afs.subSequence(0, afs.length() - 2));
|
||||||
} else {
|
} else {
|
||||||
infoView.findViewById(R.id.antifeatures).setVisibility(View.GONE);
|
infoView.findViewById(R.id.antifeatures).setVisibility(View.GONE);
|
||||||
|
infoView.findViewById(R.id.antifeatures_list).setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user