1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-12-23 03:18:04 +01:00

Lower bottom toolbar #22

This commit is contained in:
Gregor Santner 2016-06-07 13:33:50 +02:00
parent f36502ecc5
commit 14d5f04e2f
6 changed files with 24 additions and 11 deletions

View file

@ -37,8 +37,7 @@ It requires access to the Internet and to external storage to be able to upload
## Main contributors
**Project Lead:** gsantner (<https://gsantner.github.io>)
- gsantner (<https://gsantner.github.io>)
- martinchodev (<https://github.com/martinchodev>)
- scoute-dich (<https://github.com/scoute-dich>)
- vanitasvitae (<https://github.com/vanitasvitae>)

View file

@ -1,6 +1,7 @@
package com.github.dfa.diaspora_android.ui;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.support.v4.widget.SwipeRefreshLayout;
import android.util.Log;
@ -34,6 +35,15 @@ public class CustomWebViewClient extends WebViewClient {
return false;
}
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
super.onPageStarted(view, url, favicon);
swipeRefreshLayout.setEnabled(true);
if(url.endsWith("/conversations/new")){
swipeRefreshLayout.setEnabled(false);
}
}
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
swipeRefreshLayout.setRefreshing(false);

View file

@ -22,7 +22,7 @@
app:expandedTitleMarginEnd="64dp"
app:expandedTitleMarginStart="48dp"
app:layout_scrollFlags="scroll|enterAlways|snap"
app:titleEnabled="true">
app:titleEnabled="false">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
@ -47,7 +47,7 @@
<android.support.v7.widget.ActionMenuView
android:id="@+id/toolbar2"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_height="45dp"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_height="110dp"
android:gravity="bottom"
android:orientation="vertical"
android:theme="@style/ThemeOverlay.AppCompat.Dark">
@ -20,7 +20,7 @@
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginTop="32dp"
android:layout_marginTop="24dp"
android:orientation="horizontal">
<ImageView
@ -28,7 +28,9 @@
android:layout_width="@android:dimen/notification_large_icon_width"
android:layout_height="@android:dimen/notification_large_icon_height"
android:layout_gravity="center"
android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:layout_marginEnd="@dimen/activity_horizontal_margin_half"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin_half"
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:scaleType="fitCenter"
android:src="@drawable/ic_launcher" />
@ -36,14 +38,16 @@
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingEnd="@dimen/activity_horizontal_margin"
android:paddingLeft="@dimen/activity_horizontal_margin_half"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingStart="@dimen/activity_horizontal_margin_half"
android:orientation="vertical">
<TextView
android:id="@+id/navheader_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingEnd="@dimen/activity_horizontal_margin"
android:paddingStart="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/nav_header_vertical_spacing"
android:text="@string/app_name"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
@ -55,8 +59,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/activity_horizontal_margin"
android:paddingEnd="@dimen/activity_horizontal_margin"
android:paddingStart="@dimen/activity_horizontal_margin"
android:text="@string/app_copyright"
android:textColor="@color/white" />

View file

@ -3,4 +3,5 @@
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
<dimen name="activity_horizontal_margin">64dp</dimen>
<dimen name="activity_horizontal_margin_half">32dp</dimen>
</resources>

View file

@ -3,5 +3,6 @@
<dimen name="nav_header_vertical_spacing">16dp</dimen>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_horizontal_margin_half">8dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>