예제 #1
0
 public void generateScreen() {
   List<String> names = presenter.getAccountNames(username, password);
   LinearLayout layout = (LinearLayout) findViewById(R.id.accountArray);
   TextView account = new TextView(this);
   Point size = new Point();
   Display display =
       ((android.view.WindowManager) getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
   display.getSize(size);
   Button temp;
   if (!(names.size() > 0)) {
     return;
   }
   account.setBackgroundColor(Color.BLACK);
   account.setHeight(2);
   account.setWidth(size.x);
   layout.addView(account);
   for (String name : names) {
     temp = new Button(this);
     temp.setText(name);
     temp.setGravity(Gravity.CENTER);
     temp.setOnClickListener(AccountClickListener);
     layout.addView(temp);
     account = new TextView(this);
     account.setWidth(size.x);
     account.setBackgroundColor(Color.BLACK);
     account.setHeight(2);
     layout.addView(account);
   }
 }
예제 #2
0
 public void onClickLogout(View v) {
   presenter.onClickLogout();
 }
예제 #3
0
 public void onClickCreate(View v) {
   presenter.onClickCreate();
 }