Пример #1
0
  @Override
  public void onClick(View v) {
    // TODO Auto-generated method stub
    super.onClick(v);
    if (v.getId() == R.id.project_list_add_btn) {
      CreateDialog dialog =
          new CreateDialog(
              this,
              "Create a new project",
              "Please enter your project name here",
              new OnConfirmListener() {

                @Override
                public void confirmCallback(String name) {
                  createProject(name);
                }
              });
      dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);

      dialog.show();
    }
  }
Пример #2
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   View add_btn = findViewById(R.id.project_list_add_btn);
   add_btn.setOnClickListener(this);
 }