@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_store); iv = (ImageView) findViewById(R.id.round); Intent intent = getIntent(); Bitmap bitmap = intent.getParcelableExtra("bitmap"); iv.setImageBitmap(bitmap); }
@Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.bolt_torque_check); if (getIntent().getExtras() != null) { m_szMillID = getIntent().getStringExtra("millid"); m_szServicesItemID = getIntent().getStringExtra("parent_id"); } }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_bbsinfo); queue = Volley.newRequestQueue(BBSinfoActivity.this); toastOnly = new ToastOnly(this); dialog = new ProgressDialog(this); dialog.setCancelable(false); dialog.setMessage("正在加载..."); initialize(); }
/** * onCreate * * <p>Called when the activity is first created. This is where you should do all of your normal * static set up: create views, bind data to lists, etc. This method also provides you with a * Bundle containing the activity's previously frozen state, if there was one. * * <p>Always followed by onStart(). * * @param savedInstanceState Bundle */ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_stop_a_card_requests_menu_option); setTitleFromActivityLabel(R.id.title_text); // Find views by id mStopACardButton = (Button) findViewById(R.id.btn_stop_a_card_stop_a_card_menu_option); mLogoutButton = (Button) findViewById(R.id.btn_logout_stop_card_menu_option); mCancelButton = (Button) findViewById(R.id.btn_cancel_stop_a_card_menu_option); // Add onClick() listener to mLogoutButton mLogoutButton.setOnClickListener( new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub // Go back to login screen startActivity(new Intent(getApplicationContext(), Eazzy247LoginActivity.class)); } }); // end of anonymous inner class } // end of onCreate()
@Override protected void onResume() { // TODO Auto-generated method stub super.onResume(); super.initWidgets(); // font implementation of main heading "GMD": textview GMD_heading_TextView = (TextView) findViewById(R.id.Heading); GMD_heading_TextView.setTypeface(GMDApplication.fontHeading); // font implementation of page heading: textview page_Title_TextView = (TextView) findViewById(R.id.pageTitle); page_Title_TextView.setTypeface(GMDApplication.fontText); page_Title_TextView.setText("Bolt Torque"); page_Main_Heading = (TextView) findViewById(R.id.page_heading_middle); page_Main_Heading.setTypeface(GMDApplication.fontText); tv_Numbering_Heading = (TextView) findViewById(R.id.numbering); tv_Numbering_Heading.setTypeface(GMDApplication.fontHeading); tv_Numbering_Text = (TextView) findViewById(R.id.numbering_text); tv_Numbering_Text.setTypeface(GMDApplication.fontHeading); tv_Info = (TextView) findViewById(R.id.information); tv_Info.setTypeface(GMDApplication.fontHeading); tv_Info_text = (TextView) findViewById(R.id.information_text); tv_Info_text.setTypeface(GMDApplication.fontHeading); btn_Cancel = (Button) findViewById(R.id.btn_cancel); btn_SaveAndComplete = (Button) findViewById(R.id.btn_saveandcomplete); hm_Bolt_torque = new HashMap<String, String>(); btn_Cancel.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub finish(); } }); btn_SaveAndComplete.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub Save_All_Values_Function(true); } }); ll_Addrows_Bolt_Torque = (LinearLayout) findViewById(R.id.ll_row_bolt_torque); if (((LinearLayout) ll_Addrows_Bolt_Torque).getChildCount() > 0) ((LinearLayout) ll_Addrows_Bolt_Torque).removeAllViews(); progressBoltTorque = (ProgressBar) findViewById(R.id.progress_bolttorque); progressBoltTorque.setVisibility(View.VISIBLE); new populateValuesTask().execute(); }
@Override protected void onPause() { // TODO Auto-generated method stub super.onPause(); Save_All_Values_Function(false); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_my_bbs_note); iv_back = (ImageView) findViewById(R.id.blue_back); iv_back.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { MyBBSNoteClient.cancelRequests(MyBBsNote.this, true); onBackPressed(); } }); iv_title = (TextView) findViewById(R.id.blue_title); iv_title.setText("我的发帖"); iv_setting = (TextView) findViewById(R.id.blue_setting); iv_setting.setVisibility(View.GONE); list = new ArrayList<Fragment>(); list.add(new MyBBsNoteListFragment()); list.add(new MyBBsNoteListFragment4()); // list.add(new MyBBsNoteListFragment2()); list.add(new MyBBsNoteListFragment3()); vp = (ViewPager) findViewById(R.id.mybbsnotelist); vp.setOffscreenPageLimit(2); adapter = new FragmentPagerAdapter(getSupportFragmentManager()) { @Override public Fragment getItem(int position) { return list.get(position); } @Override public int getCount() { return list.size(); } }; vp.setAdapter(adapter); vp.setOnPageChangeListener( new ViewPager.OnPageChangeListener() { @Override public void onPageScrolled( int position, float positionOffset, int positionOffsetPixels) {} @Override public void onPageSelected(int position) { if (position == 0) { setposition1(); } else if (position == 1) { setposition2(); } else if (position == 2) { setposition3(); } } @Override public void onPageScrollStateChanged(int state) {} }); tv_list1 = (TextView) findViewById(R.id.tv_mybbsnotelist1); tv_list1.setOnClickListener(this); tv_list2 = (TextView) findViewById(R.id.tv_mybbsnotelist2); tv_list2.setOnClickListener(this); tv_list3 = (TextView) findViewById(R.id.tv_mybbsnotelist3); tv_list3.setOnClickListener(this); iv1 = (ImageView) findViewById(R.id.iv_mybbsnotelist1); iv2 = (ImageView) findViewById(R.id.iv_mybbsnotelist2); iv3 = (ImageView) findViewById(R.id.iv_mybbsnotelist3); }
@Override protected void onResume() { super.onResume(); dialog.show(); SharedPreferences sharedPreferences = getSharedPreferences("self", Activity.MODE_PRIVATE); String tooken = sharedPreferences.getString("AccessToken", ""); String phone = sharedPreferences.getString("phone", ""); String hguid = sharedPreferences.getString("HGUID", ""); if (NetWorkInfo.isNetworkAvailable(BBSinfoActivity.this)) { GetuserinfoClient.getforumsuserinfo( BBSinfoActivity.this, hguid, tooken, new GetForumuserinfoHandler() { @Override public void onInnovationExceptionFinish() { super.onInnovationExceptionFinish(); dialog.dismiss(); toastOnly.toastShowShort("网络超时"); } @Override public void onInnovationError(String value) { super.onInnovationError(value); dialog.dismiss(); FailMessage.showfail(BBSinfoActivity.this, value); } @Override public void onInnovationFailure(String msg) { super.onInnovationFailure(msg); dialog.dismiss(); FailMessage.showfail(BBSinfoActivity.this, msg); } @Override public void onLoginSuccess(GetForumuserinfoResponse response) { super.onLoginSuccess(response); dialog.dismiss(); tv_name.setText(response.getNickName().trim()); tv_real_name.setText(response.getRealName().trim()); if (response.getSex() == 1) { tv_sex.setText("男"); } else if (response.getSex() == 2) { tv_sex.setText("女"); } else if (response.getSex() == 0) { tv_sex.setText("保密"); } else { tv_sex.setText(""); } tv_bir.setText(response.getBirthday().trim()); if (!response.getPhone().trim().equals("")) { phone_noxx = response.getPhone().trim().substring(0, 3) + "****" + response.getPhone().trim().substring(7, 11); } else { phone_noxx = response.getPhone().trim(); } tv_phone.setText(phone_noxx); tv_qq.setText(response.getQq().trim()); tv_mail.setText(response.getEmailAddress().trim()); String sss = response.getAvatars().substring(response.getAvatars().lastIndexOf(".") + 1); // Log.e("123", sss); // boolean ispic = false; // if (sss.equals("png") || sss.equals("jpg") || // sss.equals("jpeg")){ // ispic =true; // } if (!response.getAvatars().equals("")) { ImageRequest imageRequest = new ImageRequest( response.getAvatars().replace("https", "http"), // // "http://developer.android.com/images/home/aw_dac.png", new Response.Listener<Bitmap>() { @Override public void onResponse(Bitmap response) { dialog.dismiss(); networkImageView.setImageBitmap(toRoundCorner(response, 90.0f)); } }, 0, 0, Bitmap.Config.RGB_565, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { networkImageView.setImageResource(R.drawable.touxiang); } }); queue.add(imageRequest); } else { networkImageView.setImageResource(R.drawable.touxiang); dialog.dismiss(); } } }, TestOrNot.isTest); } else { dialog.dismiss(); toastOnly.toastShowShort("请检查您的网络环境"); } }