Removed unused stuff in ChatCreationFragment and it's view

This commit is contained in:
Sylvain Berfini 2017-10-25 13:54:30 +02:00
parent 39ffe40f1a
commit 8521d923b1
3 changed files with 3 additions and 65 deletions

View file

@ -80,17 +80,6 @@
android:padding="18dp"
android:layout_gravity="right"/>
<ImageView
android:id="@+id/confirm"
android:src="@drawable/chat_room_creation_confirm"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:contentDescription="@string/content_description_valid"
android:padding="18dp"
android:layout_gravity="right"/>
</LinearLayout>
<RelativeLayout
@ -123,27 +112,6 @@
</RelativeLayout>
<RelativeLayout
android:id="@+id/layoutSubjectField"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp">
<EditText
android:id="@+id/subjectField"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@drawable/resizable_textfield"
android:contentDescription="@string/content_description_conversation_subject"
android:hint="@string/conversation_subject_hint"
android:gravity="center"
android:inputType="textEmailSubject"
android:paddingRight="5dp"
android:textColor="@android:color/black"
android:textCursorDrawable="@null"/>
</RelativeLayout>
<HorizontalScrollView
android:id="@+id/layoutContactsSelected"
android:layout_width="match_parent"
@ -151,7 +119,6 @@
android:layout_marginTop="5dp"
android:background="@drawable/resizable_textfield"
android:lines="1"
android:visibility="gone"
android:fadeScrollbars="false">
<LinearLayout

BIN
res/raw/linphone.db Normal file

Binary file not shown.

View file

@ -55,12 +55,12 @@ public class ChatCreationFragment extends Fragment implements View.OnClickListen
private ImageView allContacts, linphoneContacts;
private boolean onlyDisplayLinphoneContacts;
private View allContactsSelected, linphoneContactsSelected;
private RelativeLayout searchLayout, subjectLayout;
private RelativeLayout searchLayout;
private ImageView clearSearchField;
private EditText searchField, subjectField;
private EditText searchField;
private ProgressBar contactsFetchInProgress;
private SearchContactsListAdapter searchAdapter;
private ImageView back, next, confirm;
private ImageView back, next;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
@ -92,32 +92,8 @@ public class ChatCreationFragment extends Fragment implements View.OnClickListen
next = view.findViewById(R.id.next);
next.setOnClickListener(this);
next.setEnabled(false);
confirm = view.findViewById(R.id.confirm);
confirm.setOnClickListener(this);
confirm.setEnabled(false);
searchLayout = view.findViewById(R.id.layoutSearchField);
subjectLayout = view.findViewById(R.id.layoutSubjectField);
subjectField = view.findViewById(R.id.subjectField);
subjectField.addTextChangedListener(new TextWatcher() {
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void afterTextChanged(Editable s) {
confirm.setEnabled(subjectField.getText().length() > 0);
}
});
clearSearchField = view.findViewById(R.id.clearSearchField);
clearSearchField.setOnClickListener(this);
@ -174,9 +150,7 @@ public class ChatCreationFragment extends Fragment implements View.OnClickListen
private void displayChatCreation() {
next.setVisibility(View.VISIBLE);
next.setEnabled(contactsSelected.size() > 0);
confirm.setVisibility(View.GONE);
subjectLayout.setVisibility(View.GONE);
contactsList.setVisibility(View.VISIBLE);
searchLayout.setVisibility(View.VISIBLE);
allContacts.setVisibility(View.VISIBLE);
@ -197,7 +171,6 @@ public class ChatCreationFragment extends Fragment implements View.OnClickListen
for (ContactAddress ca : contactsSelected) {
addSelectedContactAddress(ca);
}
contactsSelectLayout.setVisibility(View.VISIBLE);
}
}
@ -208,12 +181,10 @@ public class ChatCreationFragment extends Fragment implements View.OnClickListen
private void updateListSelected() {
if (contactsSelected.size() > 0) {
contactsSelectLayout.setVisibility(View.VISIBLE);
contactsSelectLayout.invalidate();
next.setEnabled(true);
} else {
next.setEnabled(false);
contactsSelectLayout.setVisibility(View.GONE);
}
}