mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 08:39:22 +01:00
Separate text only message layouts.
This commit is contained in:
committed by
Greyson Parrelli
parent
bb97407cde
commit
718471917f
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Color;
|
||||
import androidx.annotation.AttrRes;
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.DimenRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -35,7 +36,7 @@ public class ThemeUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static int getThemedColor(@NonNull Context context, @AttrRes int attr) {
|
||||
public static @ColorInt int getThemedColor(@NonNull Context context, @AttrRes int attr) {
|
||||
TypedValue typedValue = new TypedValue();
|
||||
Resources.Theme theme = context.getTheme();
|
||||
|
||||
|
||||
@@ -181,6 +181,12 @@ public final class ViewUtil {
|
||||
view.requestLayout();
|
||||
}
|
||||
|
||||
public static void updateLayoutParamsIfNonNull(@Nullable View view, int width, int height) {
|
||||
if (view != null) {
|
||||
updateLayoutParams(view, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
public static int getLeftMargin(@NonNull View view) {
|
||||
if (ViewCompat.getLayoutDirection(view) == ViewCompat.LAYOUT_DIRECTION_LTR) {
|
||||
return ((ViewGroup.MarginLayoutParams) view.getLayoutParams()).leftMargin;
|
||||
|
||||
Reference in New Issue
Block a user