Compose messages directly from ConversationActivity. Bug #32.

This commit is contained in:
akwizgran
2014-02-09 22:44:51 +00:00
parent 269eef57e9
commit 209b1bdf1f
13 changed files with 132 additions and 57 deletions

View File

@@ -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);

View File

@@ -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);
}
}

View File

@@ -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) {