예제 #1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    ThemeService.applyTheme(this);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.tag_updates_activity);

    ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setDisplayShowTitleEnabled(false);

    actionBar.setDisplayShowCustomEnabled(true);
    actionBar.setCustomView(R.layout.header_title_view);
    ((TextView) actionBar.getCustomView().findViewById(R.id.title))
        .setText(R.string.TAd_contextEditTask);

    Fragment fragment;
    String tag;
    if (getIntent().getExtras().containsKey(TaskCommentsFragment.EXTRA_TASK)) {
      fragment = new TaskCommentsFragment();
      tag = "taskupdates_fragment"; // $NON-NLS-1$
    } else {
      fragment = new TagCommentsFragment();
      tag = "tagupdates_fragment"; // $NON-NLS-1$
    }

    FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
    transaction.add(R.id.comments_fragment_container, fragment, tag);
    transaction.commit();
  }
예제 #2
0
  /** @see android.app.Activity#onCreate(Bundle) */
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    ThemeService.applyTheme(this);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.task_edit_wrapper_activity);

    ActionBar actionBar = getSupportActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setDisplayShowTitleEnabled(false);

    actionBar.setDisplayShowCustomEnabled(true);
    actionBar.setCustomView(R.layout.header_title_view);
    ((TextView) actionBar.getCustomView().findViewById(R.id.title))
        .setText(R.string.TAd_contextEditTask);
  }
예제 #3
0
  @Override
  public void onCreate(Bundle icicle) {
    ThemeService.applyTheme(this);
    ThemeService.setForceFilterInvert(true);
    super.onCreate(icicle);

    // Set the result to CANCELED.  This will cause the widget host to cancel
    // out of the widget placement if they press the back button.
    setResult(RESULT_CANCELED);

    // Set the view layout resource to use.
    setContentView(R.layout.widget_config_activity);

    setTitle(R.string.WCA_title);

    // Find the widget id from the intent.
    Intent intent = getIntent();
    Bundle extras = intent.getExtras();
    if (extras != null) {
      mAppWidgetId =
          extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);
    }

    // If they gave us an intent without the widget id, just bail.
    if (mAppWidgetId == AppWidgetManager.INVALID_APPWIDGET_ID) {
      finish();
    }

    // set up ui
    adapter = new FilterAdapter(this, getListView(), R.layout.filter_adapter_row, true, true);
    adapter.filterStyle = R.style.TextAppearance_FLA_Filter_Widget;
    setListAdapter(adapter);

    Button button = (Button) findViewById(R.id.ok);
    button.setOnClickListener(mOnClickListener);

    StatisticsService.reportEvent(StatisticsConstants.WIDGET_CONFIG);
  }