use of android.support.v7.widget.ListViewCompat in project fuckView by w568w.
the class FullScreenListPopupWindow method onCreateView.
@Override
protected View onCreateView(final Context context) {
listView = new ListViewCompat(context);
listView.setBackgroundColor(Color.BLACK);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
listView.setAlpha(0.8f);
}
return listView;
}
use of android.support.v7.widget.ListViewCompat in project krypton-android by kryptco.
the class SelectIndividualsFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final View rootView = inflater.inflate(R.layout.fragment_teams_individual_emails_invite, container, false);
ArrayAdapter emailsAdapter = new ArrayAdapter<String>(getContext(), android.R.layout.simple_list_item_1, new ArrayList<>());
ListViewCompat emailsList = rootView.findViewById(R.id.emailResultsList);
AppCompatEditText emailText = rootView.findViewById(R.id.emailAddInput);
AppCompatImageButton addButton = rootView.findViewById(R.id.addEmailButton);
createButton = rootView.findViewById(R.id.createIndividualLink);
cancelButton = rootView.findViewById(R.id.cancelIndividualLinkButton);
emailsList.setAdapter(emailsAdapter);
addButton.setEnabled(false);
addButton.setOnClickListener(v -> {
emailsAdapter.add(emailText.getText().toString());
emailText.setText("");
createButton.setEnabled(emailsAdapter.getCount() > 0);
});
Email.colorValidEmail(emailText);
emailText.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void afterTextChanged(Editable s) {
addButton.setEnabled(Email.verifyEmailPattern.matcher(s.toString()).matches());
}
});
createButton.setEnabled(false);
createButton.setOnClickListener(v -> {
List<String> emails = new ArrayList<String>();
for (int i = 0; i < emailsAdapter.getCount(); i++) {
emails.add((String) emailsAdapter.getItem(i));
}
inviteRestriction = new Sigchain.IndirectInvitationRestriction(emails.toArray(new String[0]));
EventBus.getDefault().post(new TeamService.RequestTeamOperation(new Sigchain.RequestableTeamOperation(inviteRestriction), C.withConfirmStatusCallback(getActivity(), this::onCreateInvite)));
});
cancelButton.setOnClickListener(v -> {
getFragmentManager().popBackStack();
});
return rootView;
}
Aggregations