use of sugar.free.sightparser.applayer.descriptors.configuration_blocks.ActiveProfileBlock in project SightRemote by TebbeUbben.
the class ChangeActiveBRProfileActivity method onProfileChange.
@Override
public void onProfileChange(int profile) {
ActiveProfileBlock block = new ActiveProfileBlock();
block.setActiveProfile(ActiveProfileBlock.ActiveProfile.values()[profile]);
ArrayList<ConfigurationBlock> blocks = new ArrayList<>();
blocks.add(block);
WriteConfigurationTaskRunner taskRunner = new WriteConfigurationTaskRunner(getServiceConnector(), blocks);
(confirmationDialog = new ConfirmationDialog(this, HTMLUtil.getHTML(R.string.change_br_profile_confirmation), () -> {
taskRunner.fetch(this);
adapter.setActiveProfile(profile);
adapter.notifyDataSetChanged();
}, () -> adapter.notifyDataSetChanged())).show();
}
Aggregations