mirror of https://github.com/readrops/Readrops.git
Fixing webview padding (I really have to make a template)
This commit is contained in:
parent
bca77af852
commit
cac2bed15f
|
@ -45,7 +45,8 @@ public class ReadropsWebView extends WebView {
|
||||||
Document document = Jsoup.parse(itemWithFeed.getItem().getText());
|
Document document = Jsoup.parse(itemWithFeed.getItem().getText());
|
||||||
|
|
||||||
document.head().append("<meta name=\"viewport\" content=\"width=" + width +", initial-scale=1\">");
|
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("<style>img{display: inline;height: auto;max-width: 100%;} " +
|
||||||
|
"body { margin-left: 0px; margin-right: 0px; }</style>");
|
||||||
|
|
||||||
return document.toString();
|
return document.toString();
|
||||||
} else
|
} else
|
||||||
|
|
|
@ -31,14 +31,14 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="160dp"
|
android:layout_height="160dp"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
android:background="@drawable/toolbar_scrim"/>
|
android:background="@drawable/toolbar_scrim" />
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<android.support.v7.widget.Toolbar
|
||||||
android:id="@+id/collasping_layout_toolbar"
|
android:id="@+id/collasping_layout_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
app:layout_collapseMode="pin"
|
|
||||||
android:theme="@style/AlertDialog.AppCompat.Light"
|
android:theme="@style/AlertDialog.AppCompat.Light"
|
||||||
|
app:layout_collapseMode="pin"
|
||||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
||||||
|
|
||||||
</android.support.design.widget.CollapsingToolbarLayout>
|
</android.support.design.widget.CollapsingToolbarLayout>
|
||||||
|
@ -76,24 +76,27 @@
|
||||||
android:layout_marginTop="6dp"
|
android:layout_marginTop="6dp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:text="By Santa Klaus"
|
tools:text="By Santa Klaus"
|
||||||
tools:visibility="gone"/>
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/activity_item_readtime_layout"
|
android:id="@+id/activity_item_readtime_layout"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_below="@id/activity_item_title"
|
android:layout_below="@id/activity_item_title"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
tools:visibility="gone">
|
android:layout_marginTop="6dp"
|
||||||
|
android:layout_toEndOf="@id/activity_item_author"
|
||||||
|
android:layout_toRightOf="@id/activity_item_author"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/activity_item_readtime_icon"
|
android:id="@+id/activity_item_readtime_icon"
|
||||||
android:layout_width="16dp"
|
android:layout_width="16dp"
|
||||||
android:layout_height="16dp"
|
android:layout_height="16dp"
|
||||||
android:layout_toStartOf="@id/activity_item_readtime"
|
|
||||||
android:layout_alignBottom="@id/activity_item_readtime_icon"
|
android:layout_alignBottom="@id/activity_item_readtime_icon"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_toStartOf="@id/activity_item_readtime"
|
||||||
android:src="@drawable/ic_read_time" />
|
android:src="@drawable/ic_read_time" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -103,11 +106,11 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_marginLeft="4dp"
|
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginLeft="4dp"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
tools:text="3 minutes read" />
|
tools:text="3 mins" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
@ -118,7 +121,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
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"/>
|
android:layout_marginTop="6dp" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue