Search in sources :

Example 1 with DialogRepoConfigBinding

use of me.sheimi.sgit.databinding.DialogRepoConfigBinding in project MGit by maks.

the class ConfigAction method execute.

@Override
public void execute() {
    try {
        DialogRepoConfigBinding binding = DataBindingUtil.inflate(LayoutInflater.from(mActivity), R.layout.dialog_repo_config, null, false);
        GitConfig gitConfig = new GitConfig(mRepo);
        binding.setViewModel(gitConfig);
        AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);
        builder.setView(binding.getRoot()).setNeutralButton(R.string.label_done, null).create().show();
    } catch (StopTaskException e) {
        // FIXME: show error to user
        Timber.e(e);
    }
}
Also used : AlertDialog(android.app.AlertDialog) DialogRepoConfigBinding(me.sheimi.sgit.databinding.DialogRepoConfigBinding) GitConfig(me.sheimi.sgit.database.models.GitConfig) StopTaskException(me.sheimi.sgit.exception.StopTaskException)

Aggregations

AlertDialog (android.app.AlertDialog)1 GitConfig (me.sheimi.sgit.database.models.GitConfig)1 DialogRepoConfigBinding (me.sheimi.sgit.databinding.DialogRepoConfigBinding)1 StopTaskException (me.sheimi.sgit.exception.StopTaskException)1