@Override
  public boolean onCreateOptionsMenu(Menu menu) {
    getSupportMenuInflater().inflate(R.menu.main, menu);

    getSupportActionBar().setDisplayShowHomeEnabled(true);
    // ActionBar Layout Backgroung color changing GREEN == Ramesh Gundala
    com.actionbarsherlock.app.ActionBar actionBar = getSupportActionBar();
    actionBar.setBackgroundDrawable(getResources().getDrawable(R.drawable.actionbar));
    ImageButton b = new ImageButton(getApplicationContext());
    b.setBackgroundDrawable(null);
    b.setImageDrawable(getResources().getDrawable(R.drawable.buttondone));

    b.setOnClickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            // TODO Auto-generated method stub
            Intent intent = new Intent(getApplicationContext(), MortgageNegotiatorActivity_.class);
            intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
            startActivity(intent);
          }
        });

    menu.findItem(R.id.btnDone).setActionView(b);
    menu.findItem(R.id.github).setVisible(false);
    menu.findItem(R.id.btnDone).setVisible(true);
    return true;
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    app = TRAApplication.getApp();
    TAG = getClass().getName();
    // Log.i("SWall",TAG+":onCreate");
    defaultRequestData = new Bundle();
    defaultRequestData.putString(
        ServiceManager.Constants.KEY_USER_NAME, getCurrentAccount().userName);

    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
      actionBar.setCustomView(R.layout.title_bar);
      actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
      actionBar.setIcon(R.drawable.icon);
      actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
      actionBar.setDisplayShowCustomEnabled(true);
      actionBar.setBackgroundDrawable(getResources().getDrawable((R.color.bg)));
    }

    UmengUpdateAgent.setUpdateAutoPopup(false);
    UmengUpdateAgent.setDialogListener(
        new UmengDialogButtonListener() {

          @Override
          public void onClick(int status) {
            switch (status) {
              case UpdateStatus.Update:
                break;
              case UpdateStatus.Ignore:
                break;
              case UpdateStatus.NotNow:
                break;
            }
          }
        });
    //        if(isIgnoredOnce) {
    //            UmengUpdateAgent.update(this);
    //        }
    UmengUpdateAgent.setUpdateListener(this);
    UmengUpdateAgent.update(app.getApplicationContext());

    showQuitButton();

    setBackConfirm(false);
  }
 public void initActionBar() {
   View headView = LayoutInflater.from(this).inflate(R.layout.detail_news_actionbar, null);
   // 上一篇新闻
   Button newsDetailsTitlebarPref =
       (Button) headView.findViewById(R.id.newsdetails_titlebar_previous);
   newsDetailsTitlebarPref.setOnClickListener(this);
   // 下一篇新闻
   Button newsDetailsTitlebarNext = (Button) headView.findViewById(R.id.newsdetails_titlebar_next);
   newsDetailsTitlebarNext.setOnClickListener(this);
   // 新闻回复条数Button
   mNewsdetailsTitlebarComm = (Button) headView.findViewById(R.id.newsdetails_titlebar_comments);
   mNewsdetailsTitlebarComm.setOnClickListener(this);
   mNewsdetailsTitlebarComm.setText(mNewsData.get(mPosition).get("newslist_item_comments") + "跟帖");
   ActionBar actionBar = getSupportActionBar();
   actionBar.setCustomView(headView);
   actionBar.setDisplayShowCustomEnabled(true);
   actionBar.setDisplayShowHomeEnabled(false);
   actionBar.setDisplayHomeAsUpEnabled(true);
   actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
   actionBar.setBackgroundDrawable(getResources().getDrawable(R.drawable.title_bg));
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_course_detail);
    ActionBar bar = getSupportActionBar();
    bar.setBackgroundDrawable(getResources().getDrawable(R.drawable.gradient));
    bar.setDisplayHomeAsUpEnabled(true);
    bar.setTitle("Course Description");
    Bundle extras = getIntent().getExtras();
    i = getIntent().getExtras();
    final Course selected = List.mcourse.get(extras.getInt("SecID"));
    final ListView sections = (ListView) findViewById(R.id.sectionlist);
    CustomAdapter adapter;
    TextView Name = (TextView) findViewById(R.id.CName);
    TextView Prereqs = (TextView) findViewById(R.id.section_prereq_full);
    Prereqs.setMovementMethod(new ScrollingMovementMethod()); // Scrolling textfield
    Name.setText(selected.title);
    Section allSections[] = List.mcourse.get(extras.getInt("SecID")).sections;

    getSupportActionBar().setDisplayHomeAsUpEnabled(true); // Adds back button functionality
    sections.setOnItemClickListener(
        new OnItemClickListener() {
          public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            String credits = selected.credits;
            Section in = selected.sections[position];
            Popup(in, credits);
          }
        });

    if (selected.preReqNotes != null) {
      Prereqs.setText(
          selected.preReqNotes.replaceAll("\\<.*?>", "")); // Removes leftover html tagging
    } else {
      Prereqs.setText("None");
    }
    adapter = new CustomAdapter(this, R.layout.section_item, allSections);
    // adapter = new CustomAdapter(CourseDetail.this,R.id.sectionlist,allSections);
    sections.setAdapter(adapter);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    setContentView(R.layout.regist_page2);
    // start header
    ActionBar bar = getSupportActionBar();
    bar.setBackgroundDrawable(getResources().getDrawable(R.drawable.actionbar_bitmap));
    bar.setLogo(R.drawable.logoicon);
    bar.setCustomView(R.layout.header);
    bar.setDisplayShowCustomEnabled(true);
    bar.setDisplayHomeAsUpEnabled(true);
    titlebar_text = (TextView) findViewById(R.id.titlebar_text);
    titlebar_text.setText("기본정보 입력");
    // end header

    member_name_edit_text = (EditText) findViewById(R.id.member_name_edit_text);
    member_phone_num_edit_text = (EditText) findViewById(R.id.member_phone_num_edit_text);

    Intent in = getIntent();
    email = in.getStringExtra("email");
    password = in.getStringExtra("password");

    user_img = (ImageView) findViewById(R.id.member_img);

    user_img.setOnClickListener(
        new ImageView.OnClickListener() {
          @Override
          public void onClick(View v) {
            {
              DialogInterface.OnClickListener cameraListener =
                  new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                      doTakePhotoAction();
                    }
                  };

              DialogInterface.OnClickListener albumListener =
                  new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                      doTakeAlbumAction();
                    }
                  };

              DialogInterface.OnClickListener cancelListener =
                  new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                      dialog.dismiss();
                    }
                  };

              new AlertDialog.Builder(Register2Activity.this)
                  .setTitle("select the image")
                  .setPositiveButton("take picture", cameraListener)
                  .setNeutralButton("album", albumListener)
                  .setNegativeButton("cancel", cancelListener)
                  .show();
            }
          }
        });

    super.onCreate(savedInstanceState);
  }