add possibility to move the main navigation to the bottom (#1808)

* add possibility to move the main navigation to the bottom

* add top toolbar with drawer toggle, title and search button
This commit is contained in:
Konrad Pozniak 2020-06-18 11:04:53 +02:00 committed by GitHub
commit 74bd493878
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 188 additions and 61 deletions

View file

@ -16,6 +16,7 @@
package com.keylesspalace.tusky.util;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
@ -51,6 +52,13 @@ public class ThemeUtils {
}
}
public static int getDimension(@NonNull Context context, @AttrRes int attribute) {
TypedArray array = context.obtainStyledAttributes(new int[] { attribute });
int dimen = array.getDimensionPixelSize(0, -1);
array.recycle();
return dimen;
}
/** this can be replaced with drawableTint in xml once minSdkVersion >= 23 */
@Nullable
public static Drawable getTintedDrawable(@NonNull Context context, @DrawableRes int drawableId, @AttrRes int colorAttr) {