Example #1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    AM.getActivityManager().pushActivity(this);
    super.onCreate(savedInstanceState);
    if (getSupportActionBar() != null) {
      getSupportActionBar().setElevation(0);
    }

    if (translucentStatus()) {
      if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        setTranslucentStatus(true);
      }
      //            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
      //                Window window = getWindow();
      //                window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
      //
      // window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
      //                        | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
      //
      // window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
      //                window.setStatusBarColor(Color.TRANSPARENT);
      //            }
      mTintManager = new SystemBarTintManager(this);
      mTintManager.setStatusBarTintEnabled(true);
      // 使StatusBarTintView 和 actionbar的颜色保持一致,风格统一。
      mTintManager.setStatusBarTintResource(R.color.actionbar);
      mTintManager.setStatusBarDarkMode(true, this);
    }
  }
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   requestWindowFeature(Window.FEATURE_NO_TITLE);
   super.onCreate(savedInstanceState);
   setContentView(R.layout.activity_advertisement);
   initData();
 }
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   // set layout
   setContentView(R.layout.activity_index);
   // set table
   table = (TableLayout) findViewById(R.id.layout_activity_index);
 }
Example #4
0
 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   Log.i(LOG_TAG, "creating " + getClass());
   TextView tv = new TextView(this);
   doSampleDatabaseStuff("onCreate", tv);
   setContentView(tv);
 }
  @Override
  protected void onCreate(Bundle bundle) {
    super.onCreate(bundle);
    Log.i(TAG, "created");
    // this.setContentView(R.layout.task_detail);
    this.setContentView(R.layout.edit_alarm);
    this.getActionBar().setDisplayHomeAsUpEnabled(true);
    oldAlarm = (TaskEntity) this.getIntent().getSerializableExtra("alarmTask");
    if (oldAlarm != null) this.editAlarm = new TaskEntity(oldAlarm);
    else this.editAlarm = Utils.createTask(this);

    int[] repeat_lines =
        new int[] {
          R.id.repeat_monday_line,
          R.id.repeat_tuesday_line,
          R.id.repeat_wendsday_line,
          R.id.repeat_thursday_line,
          R.id.repeat_friday_line,
          R.id.repeat_saturday_line,
          R.id.repeat_sunday_line
        };
    int[] repeat_txt =
        new int[] {
          R.id.repeat_monday,
          R.id.repeat_tuesday,
          R.id.repeat_wendsday,
          R.id.repeat_thursday,
          R.id.repeat_friday,
          R.id.repeat_saturday,
          R.id.repeat_sunday
        };
    for (int i = 0; i < 7; i++) {
      FrameLayout localFrameLayout = (FrameLayout) this.findViewById(repeat_lines[i]);
      this.setUpRepeat(localFrameLayout, (TextView) this.findViewById(repeat_txt[i]), i + 1);
    }

    txtTimeView = (TextView) this.findViewById(R.id.edit_alarm_hour);
    txtTaskName = (TextView) this.findViewById(R.id.edit_alarm_label);

    TimeOnClickListener timeClickListener = new TimeOnClickListener();
    txtTimeView.setOnClickListener(timeClickListener);
    TaskNameOnClickListener taskNameOnClickListener = new TaskNameOnClickListener();
    txtTaskName.setOnClickListener(taskNameOnClickListener);

    radioOn = (RadioButton) this.findViewById(R.id.idRadioOn);
    radioOff = (RadioButton) this.findViewById(R.id.idRadioOff);

    if (this.editAlarm.isModeOn()) {
      radioOn.setChecked(true);
      radioOff.setChecked(false);
    } else {
      radioOn.setChecked(false);
      radioOff.setChecked(true);
    }
    txtTimeView.setText(this.editAlarm.getTimeStr(this));
    txtTaskName.setText(this.editAlarm.getTitle());
  }
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    ActivityHelper.setupTheme(this);
    setContentView(R.layout.connectionlist);

    LayoutInflater inflator = getLayoutInflater();
    View formJump = inflator.inflate(R.layout.issuejump, null);
    final RedmineIssueJumpForm header = new RedmineIssueJumpForm(formJump);

    formList = new RedmineBaseAdapterListFormHelper<RedmineProjectListAdapter>();
    formList.setList((ListView) findViewById(R.id.listConnectionList));
    formList.setHeader(formJump, true);
    formList.setFooter(inflator.inflate(R.layout.listview_footer, null), false);
    formList.setAdapter(new RedmineProjectListAdapter(getHelper()));
    formList.onRestoreInstanceState(savedInstanceState);

    header.buttonOK.setOnClickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            if (!header.Validate()) return;

            ActionActivityHelper help = new ActionActivityHelper(v.getContext());
            ProjectIntent intent = new ProjectIntent(getIntent());
            help.issue(intent.getConnectionId(), header.getIssueId());
          }
        });

    // リスト項目がクリックされた時の処理
    formList.list.setOnItemClickListener(
        new AdapterView.OnItemClickListener() {
          public void onItemClick(AdapterView<?> parent, View view, int position, long arg3) {
            ListView listView = (ListView) parent;
            Object item = listView.getItemAtPosition(position);
            if (item == null || !(item instanceof RedmineProject)) return;
            onItemSelect((RedmineProject) item);
          }
        });

    /*
    //リスト項目が長押しされた時の処理
    formList.list.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
    	public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
    		ListView listView = (ListView) parent;
    		RedmineConnection item = (RedmineConnection) listView.getItemAtPosition(position);
    		Bundle bundle = new Bundle();
    		bundle.putInt(DIALOG_PARAM_ID, item.Id());
    		bundle.putString(DIALOG_PARAM_NAME, item.Name());
    		showDialog(DIALOG_ITEM_ACTION, bundle);
    		return false;
    	}
    });
    */
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_login);

    txLogin = (TextView) findViewById(R.id.textViewLogin);
    etLogin = (EditText) findViewById(R.id.editTextLogin);
    txSenha = (TextView) findViewById(R.id.textViewSenha);
    etSenha = (EditText) findViewById(R.id.editTextSenha);
    btnOK = (Button) findViewById(R.id.buttonOK);

    etLogin.setText("user1");
    etSenha.setText("1234");

    btnOK.setOnClickListener(this);
  }