mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 11:49:04 +01:00
Compose messages directly from ConversationActivity. Bug #32.
This commit is contained in:
@@ -28,7 +28,7 @@ public class AuthorView extends RelativeLayout {
|
||||
nameView.setPadding(pad, pad, pad, pad);
|
||||
if(name == null) nameView.setText(R.string.anonymous);
|
||||
else nameView.setText(name);
|
||||
LayoutParams leftOf = CommonLayoutParams.wrapWrap();
|
||||
LayoutParams leftOf = CommonLayoutParams.relative();
|
||||
leftOf.addRule(ALIGN_PARENT_LEFT);
|
||||
leftOf.addRule(CENTER_VERTICAL);
|
||||
leftOf.addRule(LEFT_OF, 2);
|
||||
@@ -51,7 +51,7 @@ public class AuthorView extends RelativeLayout {
|
||||
statusView.setImageResource(R.drawable.identity_verified);
|
||||
break;
|
||||
}
|
||||
LayoutParams right = CommonLayoutParams.wrapWrap();
|
||||
LayoutParams right = CommonLayoutParams.relative();
|
||||
right.addRule(ALIGN_PARENT_RIGHT);
|
||||
right.addRule(CENTER_VERTICAL);
|
||||
addView(statusView, right);
|
||||
|
||||
@@ -23,7 +23,7 @@ public class CommonLayoutParams {
|
||||
public static final LinearLayout.LayoutParams WRAP_WRAP_1 =
|
||||
new LinearLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT, 1);
|
||||
|
||||
public static RelativeLayout.LayoutParams wrapWrap() {
|
||||
public static RelativeLayout.LayoutParams relative() {
|
||||
return new RelativeLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ public class LayoutUtils {
|
||||
public static int getSeparatorWidth(Context ctx) {
|
||||
DisplayMetrics metrics = getDisplayMetrics(ctx);
|
||||
int percent = Math.max(metrics.widthPixels, metrics.heightPixels) / 100;
|
||||
return Math.max(2, percent - 6);
|
||||
return Math.max(2, percent - 7);
|
||||
}
|
||||
|
||||
public static int getPadding(Context ctx) {
|
||||
|
||||
Reference in New Issue
Block a user