This commit is contained in:
Moez Bhatti
2016-06-21 00:03:04 -04:00
parent 72a83200d3
commit aae0d00ee8
4 changed files with 36 additions and 27 deletions
@@ -39,7 +39,6 @@ public class ComposeFragment extends QKFragment implements ActivityLauncher, Rec
mRecipients = (AutoCompleteContactView) view.findViewById(R.id.compose_recipients); mRecipients = (AutoCompleteContactView) view.findViewById(R.id.compose_recipients);
mRecipients.setOnItemClickListener(this); mRecipients.setOnItemClickListener(this);
view.findViewById(R.id.compose_view_stub).setVisibility(View.VISIBLE);
mComposeView = (ComposeView) view.findViewById(R.id.compose_view); mComposeView = (ComposeView) view.findViewById(R.id.compose_view);
mComposeView.onOpenConversation(null, null); mComposeView.onOpenConversation(null, null);
mComposeView.setActivityLauncher(this); mComposeView.setActivityLauncher(this);
@@ -22,13 +22,17 @@ public class AutoCompleteContactView extends RecipientEditTextView {
public AutoCompleteContactView(Context context) { public AutoCompleteContactView(Context context) {
this(context, null); this(context, null);
if (!isInEditMode()) {
init(context); init(context);
} }
}
public AutoCompleteContactView(Context context, AttributeSet attrs) { public AutoCompleteContactView(Context context, AttributeSet attrs) {
super(context, attrs); super(context, attrs);
if (!isInEditMode()) {
init(context); init(context);
} }
}
private void init(Context context) { private void init(Context context) {
mContext = (QKActivity) context; mContext = (QKActivity) context;
@@ -40,13 +40,17 @@ public class StarredContactsView extends LinearLayout implements LoaderManager.L
public StarredContactsView(Context context) { public StarredContactsView(Context context) {
super(context); super(context);
if (!isInEditMode()) {
init(context); init(context);
} }
}
public StarredContactsView(Context context, AttributeSet attrs) { public StarredContactsView(Context context, AttributeSet attrs) {
super(context, attrs); super(context, attrs);
if (!isInEditMode()) {
init(context); init(context);
} }
}
private void init(Context context) { private void init(Context context) {
mContext = (QKActivity) context; mContext = (QKActivity) context;
+14 -12
View File
@@ -1,8 +1,17 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical">
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true" android:focusable="true"
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:orientation="vertical"> android:orientation="vertical">
@@ -17,17 +26,10 @@
<include layout="@layout/view_starred_contacts" /> <include layout="@layout/view_starred_contacts" />
<View </LinearLayout>
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<ViewStub </ScrollView>
android:id="@+id/compose_view_stub"
android:layout_width="match_parent" <include layout="@layout/view_compose" />
android:layout_height="wrap_content"
android:clipToPadding="false"
android:inflatedId="@+id/compose_view"
android:layout="@layout/view_compose" />
</LinearLayout> </LinearLayout>