update minSdkVersion to 21 (#843)

* set minSdkVersion to 21

* use elevation instead of additional views for shadow

* clean up code occurrences

* remove drawable compat code

* remove no longer needed resources

* remove unneeded android:clipChildren="false"

* Revert "remove no longer needed resources"

This reverts commit 67a4d6f8d87b3f116b95d90dfb48f350d342f503.

* remove no longer needed resources (this time the right ones)
This commit is contained in:
Konrad Pozniak 2018-09-16 18:54:12 +02:00 committed by GitHub
parent 5621e5d2d4
commit 4402f3d337
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 35 additions and 249 deletions

View file

@ -17,12 +17,11 @@ android {
buildToolsVersion '27.0.3' buildToolsVersion '27.0.3'
defaultConfig { defaultConfig {
applicationId "com.keylesspalace.tusky" applicationId "com.keylesspalace.tusky"
minSdkVersion 19 minSdkVersion 21
targetSdkVersion 27 targetSdkVersion 27
versionCode 49 versionCode 49
versionName "3.1" versionName "3.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary true
} }
buildTypes { buildTypes {
release { release {

View file

@ -135,9 +135,7 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportF
val decorView = window.decorView val decorView = window.decorView
decorView.systemUiVisibility = decorView.systemUiVisibility or View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN decorView.systemUiVisibility = decorView.systemUiVisibility or View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { window.statusBarColor = Color.TRANSPARENT
window.statusBarColor = Color.TRANSPARENT
}
setContentView(R.layout.activity_account) setContentView(R.layout.activity_account)
@ -218,9 +216,7 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportF
var transparencyPercent = Math.abs(verticalOffset) / titleVisibleHeight.toFloat() var transparencyPercent = Math.abs(verticalOffset) / titleVisibleHeight.toFloat()
if (transparencyPercent > 1) transparencyPercent = 1f if (transparencyPercent > 1) transparencyPercent = 1f
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { window.statusBarColor = argbEvaluator.evaluate(transparencyPercent, statusBarColorTransparent, statusBarColorOpaque) as Int
window.statusBarColor = argbEvaluator.evaluate(transparencyPercent, statusBarColorTransparent, statusBarColorOpaque) as Int
}
val evaluatedToolbarColor = argbEvaluator.evaluate(transparencyPercent, Color.TRANSPARENT, toolbarColor) as Int val evaluatedToolbarColor = argbEvaluator.evaluate(transparencyPercent, Color.TRANSPARENT, toolbarColor) as Int
val evaluatedTabBarColor = argbEvaluator.evaluate(transparencyPercent, backgroundColor, toolbarColor) as Int val evaluatedTabBarColor = argbEvaluator.evaluate(transparencyPercent, backgroundColor, toolbarColor) as Int

View file

@ -24,7 +24,6 @@ import android.content.Context;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.text.emoji.EmojiCompat; import android.support.text.emoji.EmojiCompat;
import android.support.v7.app.AppCompatDelegate;
import com.evernote.android.job.JobManager; import com.evernote.android.job.JobManager;
import com.jakewharton.picasso.OkHttp3Downloader; import com.jakewharton.picasso.OkHttp3Downloader;
@ -95,8 +94,6 @@ public class TuskyApplication extends Application implements HasActivityInjector
JobManager.create(this).addJobCreator(notificationPullJobCreator); JobManager.create(this).addJobCreator(notificationPullJobCreator);
//necessary for Android < API 21
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
} }
/** /**

View file

@ -179,9 +179,8 @@ public final class ViewMediaActivity extends BaseActivity
View decorView = getWindow().getDecorView(); View decorView = getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_LOW_PROFILE; int uiOptions = View.SYSTEM_UI_FLAG_LOW_PROFILE;
decorView.setSystemUiVisibility(uiOptions); decorView.setSystemUiVisibility(uiOptions);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { getWindow().setStatusBarColor(Color.BLACK);
getWindow().setStatusBarColor(Color.BLACK);
}
} }
@Override @Override

View file

@ -19,7 +19,6 @@ import android.animation.Animator;
import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorListenerAdapter;
import android.graphics.Color; import android.graphics.Color;
import android.media.MediaPlayer; import android.media.MediaPlayer;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.Looper; import android.os.Looper;
@ -85,9 +84,8 @@ public class ViewVideoActivity extends BaseActivity {
} }
}); });
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { getWindow().setStatusBarColor(Color.BLACK);
getWindow().setStatusBarColor(Color.BLACK);
}
} }
@Override @Override

View file

@ -257,9 +257,6 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
usernameView = itemView.findViewById(R.id.notification_username); usernameView = itemView.findViewById(R.id.notification_username);
displayNameView = itemView.findViewById(R.id.notification_display_name); displayNameView = itemView.findViewById(R.id.notification_display_name);
avatar = itemView.findViewById(R.id.notification_avatar); avatar = itemView.findViewById(R.id.notification_avatar);
//workaround because Android < API 21 does not support setting drawableLeft from xml when it is a vector image
Drawable followIcon = ContextCompat.getDrawable(message.getContext(), R.drawable.ic_person_add_24dp);
message.setCompoundDrawablesWithIntrinsicBounds(followIcon, null, null, null);
} }
void setMessage(Account account, BidiFormatter bidiFormatter) { void setMessage(Account account, BidiFormatter bidiFormatter) {

View file

@ -3,7 +3,6 @@ package com.keylesspalace.tusky.adapter;
import android.content.ClipData; import android.content.ClipData;
import android.content.ClipboardManager; import android.content.ClipboardManager;
import android.content.Context; import android.content.Context;
import android.os.Build;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.text.SpannableStringBuilder; import android.text.SpannableStringBuilder;
import android.text.Spanned; import android.text.Spanned;
@ -137,9 +136,7 @@ class StatusDetailedViewHolder extends StatusBaseViewHolder {
cardInfo.getLayoutParams().width = ViewGroup.LayoutParams.MATCH_PARENT; cardInfo.getLayoutParams().width = ViewGroup.LayoutParams.MATCH_PARENT;
} }
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { cardView.setClipToOutline(true);
cardView.setClipToOutline(true);
}
Picasso.with(cardImage.getContext()) Picasso.with(cardImage.getContext())
.load(card.getImage()) .load(card.getImage())

View file

@ -16,7 +16,6 @@
package com.keylesspalace.tusky.adapter; package com.keylesspalace.tusky.adapter;
import android.content.Context; import android.content.Context;
import android.graphics.drawable.Drawable;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.view.View; import android.view.View;
import android.widget.ImageView; import android.widget.ImageView;
@ -24,7 +23,6 @@ import android.widget.TextView;
import com.keylesspalace.tusky.R; import com.keylesspalace.tusky.R;
import com.keylesspalace.tusky.interfaces.StatusActionListener; import com.keylesspalace.tusky.interfaces.StatusActionListener;
import com.keylesspalace.tusky.util.ThemeUtils;
import com.keylesspalace.tusky.viewdata.StatusViewData; import com.keylesspalace.tusky.viewdata.StatusViewData;
import com.squareup.picasso.Picasso; import com.squareup.picasso.Picasso;
@ -38,10 +36,6 @@ public class StatusViewHolder extends StatusBaseViewHolder {
super(itemView, useAbsoluteTime); super(itemView, useAbsoluteTime);
avatarReblog = itemView.findViewById(R.id.status_avatar_reblog); avatarReblog = itemView.findViewById(R.id.status_avatar_reblog);
rebloggedBar = itemView.findViewById(R.id.status_reblogged); rebloggedBar = itemView.findViewById(R.id.status_reblogged);
//workaround because Android < API 21 does not support setting drawableLeft from xml when it is a vector image
Drawable rebloggedIcon = ThemeUtils.getDrawable(rebloggedBar.getContext(),
R.attr.status_reblog_small_drawable, R.drawable.ic_reblog_dark_18dp);
rebloggedBar.setCompoundDrawablesWithIntrinsicBounds(rebloggedIcon, null, null, null);
} }
@Override @Override

View file

@ -24,11 +24,8 @@ import android.util.Log;
import com.keylesspalace.tusky.BuildConfig; import com.keylesspalace.tusky.BuildConfig;
import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.net.Proxy; import java.net.Proxy;
import java.net.Socket;
import java.security.KeyManagementException; import java.security.KeyManagementException;
import java.security.KeyStore; import java.security.KeyStore;
import java.security.KeyStoreException; import java.security.KeyStoreException;
@ -39,7 +36,6 @@ import java.util.List;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.TrustManagerFactory;
@ -106,7 +102,7 @@ public class OkHttpUtils {
builder.proxy(new Proxy(Proxy.Type.HTTP, address)); builder.proxy(new Proxy(Proxy.Type.HTTP, address));
} }
return enableHigherTlsOnPreLollipop(builder); return builder;
} }
/** /**
@ -168,98 +164,4 @@ public class OkHttpUtils {
specList.add(spec); specList.add(spec);
} }
private static OkHttpClient.Builder enableHigherTlsOnPreLollipop(OkHttpClient.Builder builder) {
if (Build.VERSION.SDK_INT < 22) {
try {
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(
TrustManagerFactory.getDefaultAlgorithm());
trustManagerFactory.init((KeyStore) null);
TrustManager[] trustManagers = trustManagerFactory.getTrustManagers();
if (trustManagers.length != 1 || !(trustManagers[0] instanceof X509TrustManager)) {
throw new IllegalStateException("Unexpected default trust managers:"
+ Arrays.toString(trustManagers));
}
X509TrustManager trustManager = (X509TrustManager) trustManagers[0];
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(null, new TrustManager[] { trustManager }, null);
SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();
builder.sslSocketFactory(new SSLSocketFactoryCompat(sslSocketFactory),
trustManager);
} catch (NoSuchAlgorithmException|KeyStoreException|KeyManagementException e) {
Log.e(TAG, "Failed enabling TLS 1.1 & 1.2. " + e.getMessage());
}
}
return builder;
}
private static class SSLSocketFactoryCompat extends SSLSocketFactory {
private static final String[] DESIRED_TLS_VERSIONS = { "TLSv1", "TLSv1.1", "TLSv1.2",
"TLSv1.3" };
final SSLSocketFactory delegate;
SSLSocketFactoryCompat(SSLSocketFactory base) {
this.delegate = base;
}
@Override
public String[] getDefaultCipherSuites() {
return delegate.getDefaultCipherSuites();
}
@Override
public String[] getSupportedCipherSuites() {
return delegate.getSupportedCipherSuites();
}
@Override
public Socket createSocket(Socket s, String host, int port, boolean autoClose)
throws IOException {
return patch(delegate.createSocket(s, host, port, autoClose));
}
@Override
public Socket createSocket(String host, int port) throws IOException {
return patch(delegate.createSocket(host, port));
}
@Override
public Socket createSocket(String host, int port, InetAddress localHost, int localPort)
throws IOException {
return patch(delegate.createSocket(host, port, localHost, localPort));
}
@Override
public Socket createSocket(InetAddress host, int port) throws IOException {
return patch(delegate.createSocket(host, port));
}
@Override
public Socket createSocket(InetAddress address, int port, InetAddress localAddress,
int localPort) throws IOException {
return patch(delegate.createSocket(address, port, localAddress, localPort));
}
@NonNull
private static String[] getMatches(String[] wanted, String[] have) {
List<String> a = new ArrayList<>(Arrays.asList(wanted));
List<String> b = Arrays.asList(have);
a.retainAll(b);
return a.toArray(new String[0]);
}
private Socket patch(Socket socket) {
if (socket instanceof SSLSocket) {
SSLSocket sslSocket = (SSLSocket) socket;
String[] protocols = getMatches(DESIRED_TLS_VERSIONS,
sslSocket.getSupportedProtocols());
sslSocket.setEnabledProtocols(protocols);
}
return socket;
}
}
} }

View file

@ -31,12 +31,10 @@ class ComposeOptionsView @JvmOverloads constructor(context: Context, attrs: Attr
init { init {
inflate(context, R.layout.view_compose_options, this) inflate(context, R.layout.view_compose_options, this)
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { publicRadioButton.setButtonDrawable(R.drawable.ic_public_24dp)
publicRadioButton.setButtonDrawable(R.drawable.ic_public_24dp) unlistedRadioButton.setButtonDrawable(R.drawable.ic_lock_open_24dp)
unlistedRadioButton.setButtonDrawable(R.drawable.ic_lock_open_24dp) privateRadioButton.setButtonDrawable(R.drawable.ic_lock_outline_24dp)
privateRadioButton.setButtonDrawable(R.drawable.ic_lock_outline_24dp) directRadioButton.setButtonDrawable(R.drawable.ic_email_24dp)
directRadioButton.setButtonDrawable(R.drawable.ic_email_24dp)
}
visibilityRadioGroup.setOnCheckedChangeListener { _, checkedId -> visibilityRadioGroup.setOnCheckedChangeListener { _, checkedId ->
val visibility = when (checkedId) { val visibility = when (checkedId) {

View file

@ -33,9 +33,7 @@ import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.net.Uri; import android.net.Uri;
import android.os.Build;
import android.support.annotation.DrawableRes; import android.support.annotation.DrawableRes;
import android.support.annotation.RequiresApi;
import android.support.v7.widget.AppCompatImageView; import android.support.v7.widget.AppCompatImageView;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.view.View; import android.view.View;
@ -96,9 +94,7 @@ public class RoundedImageView extends AppCompatImageView {
super.setScaleType(SCALE_TYPE); super.setScaleType(SCALE_TYPE);
mReady = true; mReady = true;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { setOutlineProvider(new OutlineProvider());
setOutlineProvider(new OutlineProvider());
}
if (mSetupPending) { if (mSetupPending) {
setup(); setup();
@ -317,7 +313,6 @@ public class RoundedImageView extends AppCompatImageView {
mBitmapShader.setLocalMatrix(mShaderMatrix); mBitmapShader.setLocalMatrix(mShaderMatrix);
} }
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
private class OutlineProvider extends ViewOutlineProvider { private class OutlineProvider extends ViewOutlineProvider {
@Override @Override

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/color_background_dark" />
<corners android:radius="4dp" />
</shape>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#dedede" />
<corners android:radius="4dp" />
</shape>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

View file

@ -1,21 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<item> <solid android:color="@color/color_background_dark" />
<shape android:shape="rectangle"> <corners android:radius="4dp" />
<solid android:color="#6000"/> </shape>
<corners android:radius="5dp"/>
</shape>
</item>
<item
android:left="0dp"
android:right="0dp"
android:top="0dp"
android:bottom="2dp">
<shape android:shape="rectangle">
<solid android:color="@color/color_background_dark"/>
<corners android:radius="5dp"/>
</shape>
</item>
</layer-list>

View file

@ -1,21 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<item> <solid android:color="#dedede" />
<shape android:shape="rectangle"> <corners android:radius="4dp" />
<solid android:color="#6000"/> </shape>
<corners android:radius="5dp"/>
</shape>
</item>
<item
android:left="0dp"
android:right="0dp"
android:top="0dp"
android:bottom="2dp">
<shape android:shape="rectangle">
<solid android:color="#dedede"/>
<corners android:radius="5dp"/>
</shape>
</item>
</layer-list>

View file

@ -109,8 +109,6 @@
</android.support.v4.widget.NestedScrollView> </android.support.v4.widget.NestedScrollView>
</FrameLayout> </FrameLayout>
<include layout="@layout/toolbar_shadow_shim" />
<include layout="@layout/item_status_bottom_sheet" /> <include layout="@layout/item_status_bottom_sheet" />
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>

View file

@ -15,6 +15,4 @@
android:layout_height="match_parent" android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<include layout="@layout/toolbar_shadow_shim" />
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>

View file

@ -173,8 +173,6 @@
</android.support.v4.widget.NestedScrollView> </android.support.v4.widget.NestedScrollView>
<include layout="@layout/toolbar_shadow_shim" />
<ProgressBar <ProgressBar
android:id="@+id/saveProgressBar" android:id="@+id/saveProgressBar"
android:layout_width="wrap_content" android:layout_width="wrap_content"

View file

@ -15,8 +15,6 @@
android:layout_height="match_parent" android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<include layout="@layout/toolbar_shadow_shim" />
<include layout="@layout/item_status_bottom_sheet"/> <include layout="@layout/item_status_bottom_sheet"/>
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>

View file

@ -205,8 +205,6 @@
</ScrollView> </ScrollView>
<include layout="@layout/toolbar_shadow_shim" />
<include layout="@layout/item_status_bottom_sheet" /> <include layout="@layout/item_status_bottom_sheet" />
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>

View file

@ -7,14 +7,6 @@
<include layout="@layout/toolbar_basic" /> <include layout="@layout/toolbar_basic" />
<include
layout="@layout/toolbar_shadow_shim"
android:layout_width="0dp"
android:layout_height="4dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/appbar" />
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
android:id="@+id/lists_recycler" android:id="@+id/lists_recycler"
android:layout_width="0dp" android:layout_width="0dp"
@ -22,7 +14,7 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar_shadow_shim" /> app:layout_constraintTop_toBottomOf="parent" />
<ProgressBar <ProgressBar
android:id="@+id/progress_bar" android:id="@+id/progress_bar"

View file

@ -9,7 +9,8 @@
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:clipChildren="false">
<ImageButton <ImageButton
android:id="@+id/drawer_toggle" android:id="@+id/drawer_toggle"
@ -20,6 +21,7 @@
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:background="?android:colorBackground" android:background="?android:colorBackground"
android:contentDescription="@string/action_open_drawer" android:contentDescription="@string/action_open_drawer"
android:elevation="@dimen/actionbar_elevation"
app:layout_anchor="@id/pager" app:layout_anchor="@id/pager"
app:layout_anchorGravity="top|left" app:layout_anchorGravity="top|left"
app:srcCompat="@drawable/ic_menu_24dp" /> app:srcCompat="@drawable/ic_menu_24dp" />
@ -32,6 +34,7 @@
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:layout_toEndOf="@id/drawer_toggle" android:layout_toEndOf="@id/drawer_toggle"
android:background="?android:colorBackground" android:background="?android:colorBackground"
android:elevation="@dimen/actionbar_elevation"
app:tabGravity="fill" app:tabGravity="fill"
app:tabIndicatorHeight="3dp" app:tabIndicatorHeight="3dp"
app:tabMaxWidth="0dp" app:tabMaxWidth="0dp"
@ -71,15 +74,6 @@
</RelativeLayout> </RelativeLayout>
<View
android:id="@+id/tab_bottom_shadow"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="@drawable/material_drawer_shadow_bottom"
android:visibility="visible"
app:layout_anchor="@id/tab_layout"
app:layout_anchorGravity="bottom" />
<android.support.design.widget.FloatingActionButton <android.support.design.widget.FloatingActionButton
android:id="@+id/floating_btn" android:id="@+id/floating_btn"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -90,6 +84,6 @@
app:layout_anchorGravity="bottom|end" app:layout_anchorGravity="bottom|end"
app:srcCompat="@drawable/ic_create_24dp" /> app:srcCompat="@drawable/ic_create_24dp" />
<include layout="@layout/item_status_bottom_sheet"/> <include layout="@layout/item_status_bottom_sheet" />
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>

View file

@ -15,8 +15,6 @@
android:layout_height="match_parent" android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<include layout="@layout/toolbar_shadow_shim" />
<include layout="@layout/item_status_bottom_sheet"/> <include layout="@layout/item_status_bottom_sheet"/>
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>

View file

@ -15,6 +15,4 @@
android:layout_height="match_parent" android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<include layout="@layout/toolbar_shadow_shim" />
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>

View file

@ -37,6 +37,4 @@
android:hint="@string/report_comment_hint" /> android:hint="@string/report_comment_hint" />
</LinearLayout> </LinearLayout>
<include layout="@layout/toolbar_shadow_shim" />
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>

View file

@ -29,6 +29,4 @@
</RelativeLayout> </RelativeLayout>
<include layout="@layout/toolbar_shadow_shim" />
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>

View file

@ -29,8 +29,6 @@
android:layout_height="match_parent" android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<include layout="@layout/toolbar_shadow_shim" />
<include layout="@layout/item_status_bottom_sheet"/> <include layout="@layout/item_status_bottom_sheet"/>
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>

View file

@ -15,8 +15,6 @@
android:layout_height="match_parent" android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<include layout="@layout/toolbar_shadow_shim" />
<include layout="@layout/item_status_bottom_sheet"/> <include layout="@layout/item_status_bottom_sheet"/>
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>

View file

@ -15,8 +15,6 @@
android:layout_height="match_parent" android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<include layout="@layout/toolbar_shadow_shim" />
<include layout="@layout/item_status_bottom_sheet"/> <include layout="@layout/item_status_bottom_sheet"/>
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>

View file

@ -18,6 +18,7 @@
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:drawablePadding="10dp" android:drawablePadding="10dp"
android:drawableStart="@drawable/ic_person_add_24dp"
android:ellipsize="end" android:ellipsize="end"
android:gravity="center_vertical" android:gravity="center_vertical"
android:maxLines="1" android:maxLines="1"

View file

@ -13,6 +13,7 @@
<android.support.text.emoji.widget.EmojiTextView <android.support.text.emoji.widget.EmojiTextView
android:id="@+id/status_reblogged" android:id="@+id/status_reblogged"
android:drawableStart="?attr/status_reblog_small_drawable"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/status_reblogged_bar_padding_top" android:layout_marginTop="@dimen/status_reblogged_bar_padding_top"

View file

@ -6,8 +6,7 @@
android:id="@+id/appbar" android:id="@+id/appbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:stateListAnimator="@null" android:elevation="@dimen/actionbar_elevation"
android:elevation="0dp"
app:layout_collapseMode="pin"> app:layout_collapseMode="pin">
<android.support.v7.widget.Toolbar <android.support.v7.widget.Toolbar

View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<View xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar_shadow_shim"
android:layout_width="match_parent"
android:layout_height="4dp"
android:background="@drawable/material_drawer_shadow_bottom"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
app:layout_collapseMode="pin" />

View file

@ -26,4 +26,6 @@
<dimen name="compose_activity_scrollview_height">-1px</dimen> <!-- match_parent --> <dimen name="compose_activity_scrollview_height">-1px</dimen> <!-- match_parent -->
<dimen name="timeline_width">-1px</dimen> <!-- match_parent --> <dimen name="timeline_width">-1px</dimen> <!-- match_parent -->
<dimen name="actionbar_elevation">4dp</dimen>
</resources> </resources>