use of android.support.v7.widget.AppCompatTextView in project AndroidDevelop by 7449.
the class ShowAppAdapter method onBind.
@Override
protected void onBind(ViewHolder holder, int position, AppModel appModel) {
if (appModel.getAppIcon() != null && appModel.getAppLabel() != null) {
AppCompatTextView textView = holder.getAppCompatTextView(R.id.show_tv_app_name);
textView.setText(appModel.getAppLabel());
TextDrawableUtils.setAppDrawable(textView, appModel.getAppIcon());
}
}
use of android.support.v7.widget.AppCompatTextView in project AndroidDevelop by 7449.
the class EasyCityView method initView.
private void initView() {
//初始化数据,必须先执行这一步
JsonDataUtils.get().init(getContext());
rootView = getActivity().getLayoutInflater().inflate(R.layout.city_easy_view, null);
AppCompatTextView tvTitle = (AppCompatTextView) rootView.findViewById(R.id.easy_title);
provinceView = (NumberPickerView) rootView.findViewById(R.id.easy_province);
cityView = (NumberPickerView) rootView.findViewById(R.id.easy_city);
areaView = (NumberPickerView) rootView.findViewById(R.id.easy_area);
rootView.findViewById(R.id.easy_cancel).setOnClickListener(this);
rootView.findViewById(R.id.easy_next).setOnClickListener(this);
tvTitle.setText(title);
initViewData();
}
use of android.support.v7.widget.AppCompatTextView in project AndroidDevelop by 7449.
the class EasyPickerView method initView.
private void initView() {
rootView = getActivity().getLayoutInflater().inflate(R.layout.picker_easy_view, null);
AppCompatTextView tvTitle = (AppCompatTextView) rootView.findViewById(R.id.easy_title);
pickerView = (NumberPickerView) rootView.findViewById(R.id.easy_picker);
rootView.findViewById(R.id.easy_cancel).setOnClickListener(this);
rootView.findViewById(R.id.easy_next).setOnClickListener(this);
tvTitle.setText(title);
initPickerView();
}
use of android.support.v7.widget.AppCompatTextView in project krypton-android by kryptco.
the class CreateInviteDialogFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final View rootView = inflater.inflate(R.layout.fragment_teams_invite_modal, container, false);
String myEmail = getArguments().getString("myEmail");
// TODO: filter on common email endings and hide team link in that case
String[] emailToks = myEmail.split("@");
AppCompatImageButton teamLinkButton = rootView.findViewById(R.id.teamLinkButton);
if (emailToks.length == 2) {
String domain = emailToks[1];
AppCompatTextView teamLinkDetail = rootView.findViewById(R.id.teamEmailLinkDetail);
teamLinkDetail.setText("Anyone with an @" + domain + " email address");
teamLinkButton.setOnClickListener(v -> {
AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
builder.setTitle("Create a team-only invite link?").setMessage("This will create a secret invite link that can only be used by people with an @" + domain + " email address.").setPositiveButton("Yes", (dialog, which) -> {
Sigchain.RequestableTeamOperation request = new Sigchain.RequestableTeamOperation(new Sigchain.IndirectInvitationRestriction(domain));
EventBus.getDefault().post(new TeamService.RequestTeamOperation(request, TeamService.C.withStatusCallback(getActivity(), this::onCreateInvite)));
getFragmentManager().beginTransaction().remove(this).commitAllowingStateLoss();
}).setNegativeButton("No", (dialog, which) -> {
getFragmentManager().beginTransaction().remove(this).commitAllowingStateLoss();
}).show();
});
} else {
// TODO: hide teamLinkButton if no domain on email or user has a common domain like gmail
}
AppCompatImageButton individualLinkButton = rootView.findViewById(R.id.individualsLinkButton);
individualLinkButton.setOnClickListener(v -> {
getFragmentManager().beginTransaction().setCustomAnimations(R.anim.enter_from_right, R.anim.exit_to_left, R.anim.enter_from_left, R.anim.exit_to_right).replace(R.id.fragmentOverlay, SelectIndividualsFragment.newInstance()).addToBackStack(null).commitAllowingStateLoss();
});
AppCompatImageButton inpersonButton = rootView.findViewById(R.id.inPersonButton);
inpersonButton.setOnClickListener(v -> {
Transitions.beginFade(this).replace(R.id.fragmentOverlay, new AdminQR()).addToBackStack(null).commitAllowingStateLoss();
});
return rootView;
}
use of android.support.v7.widget.AppCompatTextView in project krypton-android by kryptco.
the class AdminVerify method onCreateView.
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
final View v = inflater.inflate(R.layout.fragment_teams_invite_inperson_admin_confirm_email, container, false);
Sigchain.MemberQRPayload qr = AdminScan.lastScannedPayload.get();
if (qr != null) {
AppCompatTextView email = v.findViewById(R.id.confirmEmailLabel);
email.setText(qr.email);
AppCompatButton confirmButton = v.findViewById(R.id.confirmMember);
confirmButton.setOnClickListener(b -> {
EventBus.getDefault().post(new TeamService.RequestTeamOperation(new Sigchain.RequestableTeamOperation(new Sigchain.DirectInvitation(qr.publicKey, qr.email)), C.withStatusCallback(getActivity(), this::onInviteCreated)));
});
AppCompatButton cancelButton = v.findViewById(R.id.cancelButton);
cancelButton.setOnClickListener(b -> {
getFragmentManager().popBackStackImmediate(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);
});
} else {
Error.shortToast(getContext(), "Please scan the new member's QR code again.");
getFragmentManager().popBackStack();
}
return v;
}
Aggregations