Removed unused stuff in ChatCreationFragment and it's view
This commit is contained in:
parent
39ffe40f1a
commit
8521d923b1
3 changed files with 3 additions and 65 deletions
|
@ -80,17 +80,6 @@
|
||||||
android:padding="18dp"
|
android:padding="18dp"
|
||||||
android:layout_gravity="right"/>
|
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>
|
</LinearLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
@ -123,27 +112,6 @@
|
||||||
|
|
||||||
</RelativeLayout>
|
</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
|
<HorizontalScrollView
|
||||||
android:id="@+id/layoutContactsSelected"
|
android:id="@+id/layoutContactsSelected"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -151,7 +119,6 @@
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:background="@drawable/resizable_textfield"
|
android:background="@drawable/resizable_textfield"
|
||||||
android:lines="1"
|
android:lines="1"
|
||||||
android:visibility="gone"
|
|
||||||
android:fadeScrollbars="false">
|
android:fadeScrollbars="false">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|
BIN
res/raw/linphone.db
Normal file
BIN
res/raw/linphone.db
Normal file
Binary file not shown.
|
@ -55,12 +55,12 @@ public class ChatCreationFragment extends Fragment implements View.OnClickListen
|
||||||
private ImageView allContacts, linphoneContacts;
|
private ImageView allContacts, linphoneContacts;
|
||||||
private boolean onlyDisplayLinphoneContacts;
|
private boolean onlyDisplayLinphoneContacts;
|
||||||
private View allContactsSelected, linphoneContactsSelected;
|
private View allContactsSelected, linphoneContactsSelected;
|
||||||
private RelativeLayout searchLayout, subjectLayout;
|
private RelativeLayout searchLayout;
|
||||||
private ImageView clearSearchField;
|
private ImageView clearSearchField;
|
||||||
private EditText searchField, subjectField;
|
private EditText searchField;
|
||||||
private ProgressBar contactsFetchInProgress;
|
private ProgressBar contactsFetchInProgress;
|
||||||
private SearchContactsListAdapter searchAdapter;
|
private SearchContactsListAdapter searchAdapter;
|
||||||
private ImageView back, next, confirm;
|
private ImageView back, next;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
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 = view.findViewById(R.id.next);
|
||||||
next.setOnClickListener(this);
|
next.setOnClickListener(this);
|
||||||
next.setEnabled(false);
|
next.setEnabled(false);
|
||||||
|
|
||||||
confirm = view.findViewById(R.id.confirm);
|
|
||||||
confirm.setOnClickListener(this);
|
|
||||||
confirm.setEnabled(false);
|
|
||||||
|
|
||||||
searchLayout = view.findViewById(R.id.layoutSearchField);
|
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 = view.findViewById(R.id.clearSearchField);
|
||||||
clearSearchField.setOnClickListener(this);
|
clearSearchField.setOnClickListener(this);
|
||||||
|
|
||||||
|
@ -174,9 +150,7 @@ public class ChatCreationFragment extends Fragment implements View.OnClickListen
|
||||||
private void displayChatCreation() {
|
private void displayChatCreation() {
|
||||||
next.setVisibility(View.VISIBLE);
|
next.setVisibility(View.VISIBLE);
|
||||||
next.setEnabled(contactsSelected.size() > 0);
|
next.setEnabled(contactsSelected.size() > 0);
|
||||||
confirm.setVisibility(View.GONE);
|
|
||||||
|
|
||||||
subjectLayout.setVisibility(View.GONE);
|
|
||||||
contactsList.setVisibility(View.VISIBLE);
|
contactsList.setVisibility(View.VISIBLE);
|
||||||
searchLayout.setVisibility(View.VISIBLE);
|
searchLayout.setVisibility(View.VISIBLE);
|
||||||
allContacts.setVisibility(View.VISIBLE);
|
allContacts.setVisibility(View.VISIBLE);
|
||||||
|
@ -197,7 +171,6 @@ public class ChatCreationFragment extends Fragment implements View.OnClickListen
|
||||||
for (ContactAddress ca : contactsSelected) {
|
for (ContactAddress ca : contactsSelected) {
|
||||||
addSelectedContactAddress(ca);
|
addSelectedContactAddress(ca);
|
||||||
}
|
}
|
||||||
contactsSelectLayout.setVisibility(View.VISIBLE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,12 +181,10 @@ public class ChatCreationFragment extends Fragment implements View.OnClickListen
|
||||||
|
|
||||||
private void updateListSelected() {
|
private void updateListSelected() {
|
||||||
if (contactsSelected.size() > 0) {
|
if (contactsSelected.size() > 0) {
|
||||||
contactsSelectLayout.setVisibility(View.VISIBLE);
|
|
||||||
contactsSelectLayout.invalidate();
|
contactsSelectLayout.invalidate();
|
||||||
next.setEnabled(true);
|
next.setEnabled(true);
|
||||||
} else {
|
} else {
|
||||||
next.setEnabled(false);
|
next.setEnabled(false);
|
||||||
contactsSelectLayout.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue