Adding back navigation to item activity and fixing bug when either description or content are null

This commit is contained in:
Shinokuni 2019-02-09 19:13:46 +00:00
parent a2c3aa22c8
commit bca77af852
4 changed files with 29 additions and 9 deletions

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="WizardSettings">
<option name="children">
<map>
<entry key="vectorWizard">
<value>
<PersistentState />
</value>
</entry>
</map>
</option>
</component>
</project>

View File

@ -25,7 +25,8 @@
</intent-filter>
</activity>
<activity android:name=".ItemActivity"
android:theme="@style/AppTheme.NoActionBar">
android:theme="@style/AppTheme.NoActionBar"
android:parentActivityName=".MainActivity">
</activity>
</application>

View File

@ -41,12 +41,16 @@ public class ReadropsWebView extends WebView {
}
private String getText() {
if (itemWithFeed.getItem().getText() != null) {
Document document = Jsoup.parse(itemWithFeed.getItem().getText());
document.head().append("<meta name=\"viewport\" content=\"width=" + width +", initial-scale=1\">");
document.head().append("<style>img{display: inline;height: auto;max-width: 100%;}</style>");
return document.toString();
} else
return null;
}

View File

@ -52,13 +52,13 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:padding="6dp">
<RelativeLayout
android:id="@+id/activity_item_details_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="6dp">
android:layout_height="wrap_content">
<TextView
android:id="@+id/activity_item_title"
@ -117,7 +117,8 @@
android:id="@+id/item_webview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/activity_item_details_layout" />
android:layout_below="@id/activity_item_details_layout"
android:layout_marginTop="6dp"/>
</RelativeLayout>