androidx.constraintlayout.widget.Group Java Examples
The following examples show how to use
androidx.constraintlayout.widget.Group.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FragmentOptions.java From FairEmail with GNU General Public License v3.0 | 5 votes |
@NonNull @Override public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) { View dview = LayoutInflater.from(getContext()).inflate(R.layout.dialog_setup, null); CheckBox cbNotAgain = dview.findViewById(R.id.cbNotAgain); Group grp3 = dview.findViewById(R.id.grp3); Group grp4 = dview.findViewById(R.id.grp4); cbNotAgain.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext()); prefs.edit().putBoolean("setup_reminder", !isChecked).apply(); } }); boolean hasPermissions = Helper.hasPermission(getContext(), Manifest.permission.READ_CONTACTS); Boolean isIgnoring = Helper.isIgnoringOptimizations(getContext()); grp3.setVisibility(hasPermissions ? View.GONE : View.VISIBLE); grp4.setVisibility(isIgnoring == null || isIgnoring ? View.GONE : View.VISIBLE); return new AlertDialog.Builder(getContext()) .setView(dview) .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { sendResult(Activity.RESULT_OK); } }) .setNegativeButton(android.R.string.cancel, null) .create(); }
Example #2
Source File: InternalApisFragment.java From line-sdk-android with Apache License 2.0 | 5 votes |
private void toggleGroupVisibility(Group group) { if (group.getVisibility() == View.VISIBLE) { group.setVisibility(View.GONE); } else { group.setVisibility(View.VISIBLE); } }
Example #3
Source File: TabVerticalGridView.java From LeanbackTvSample with MIT License | 4 votes |
public void setGroup(Group mGroup) { this.mGroup = mGroup; }
Example #4
Source File: MainActivity.java From LeanbackTvSample with MIT License | 4 votes |
public Group getGroup() { return mGroup; }
Example #5
Source File: InternalApisFragment.java From line-sdk-android with Apache License 2.0 | 4 votes |
private Receiver(final LineGroup group) { type = Type.Group; id = group.getGroupId(); displayName = group.getGroupName(); }