mirror of https://github.com/readrops/Readrops.git
Adding back navigation to item activity and fixing bug when either description or content are null
This commit is contained in:
parent
a2c3aa22c8
commit
bca77af852
|
@ -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>
|
|
@ -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>
|
||||
|
|
|
@ -41,12 +41,16 @@ public class ReadropsWebView extends WebView {
|
|||
}
|
||||
|
||||
private String getText() {
|
||||
Document document = Jsoup.parse(itemWithFeed.getItem().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>");
|
||||
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;
|
||||
|
||||
return document.toString();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue