List of usage examples for android.graphics.drawable BitmapDrawable BitmapDrawable
@Deprecated
public BitmapDrawable()
From source file:com.mci.firstidol.activity.MainActivity.java
/** * ?/*w w w . j a va 2 s .c o m*/ * * @param starList */ public void initStarList(final List<Object> starList) { starAdapter = new MyStarAdapter(context, starList, null); star_gridView.setAdapter(starAdapter); star_gridView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) { Constant.starModel = (StarModel) starList.get(position); PreferencesUtils.setStarId(context, Constant.starModel.starId); updateStarNotice(); if (starPopWindows != null && starPopWindows.isShowing()) { starPopWindows.dismiss(); isMasterRequest(); } } }); starPopWindows = new PopupWindow(view_myStar, LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT, true); starPopWindows.setOutsideTouchable(true); starPopWindows.setBackgroundDrawable(new BitmapDrawable()); starPopWindows.setAnimationStyle(R.style.mypopwindow_anim_style); starPopWindows.showAsDropDown(titleTextView); }
From source file:com.sft.blackcatapp.EnrollSchoolActivity.java
private void showPopupWindow(View parent) { if (popupWindow == null) { View view = View.inflate(mContext, R.layout.pop_window, null); TextView c1Car = (TextView) view.findViewById(R.id.pop_window_one); c1Car.setText(R.string.c1_automatic_gear_car); TextView c2Car = (TextView) view.findViewById(R.id.pop_window_two); c2Car.setText(R.string.c2_manual_gear_car); c1Car.setOnClickListener(this); c2Car.setOnClickListener(this); popupWindow = new PopupWindow(view, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); }//from w ww. ja v a 2s .com popupWindow.setFocusable(true); popupWindow.setOutsideTouchable(true); // Back??? popupWindow.setBackgroundDrawable(new BitmapDrawable()); // WindowManager windowManager = (WindowManager) // getSystemService(Context.WINDOW_SERVICE); // int xPos = -popupWindow.getWidth() / 2 // + getCustomTitle().getCenter().getWidth() / 2; popupWindow.showAsDropDown(parent); }
From source file:com.cybrosys.scientific.EventListener.java
@SuppressWarnings("deprecation") public void Memstore() { mHandler.onEnter();// w w w.j ava 2 s . c o m String strDisplay = mHandler.getDisplayText(); if (isValidNumber(strDisplay)) { final String strTemp = strDisplay; spMemory = ctx.getSharedPreferences(PREFNAME, 0); LayoutInflater inflater = (LayoutInflater) ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE); vwLayout = inflater.inflate(R.layout.memory, (ViewGroup) ((Activity) ctx).findViewById(R.id.popup_element)); popmW1 = new PopupWindow(vwLayout, PalmCalcActivity.inDispwidth, PalmCalcActivity.inDispheight, true); popmW1.setBackgroundDrawable(new BitmapDrawable()); popmW1.setOutsideTouchable(true); popmW1.showAtLocation(vwLayout, Gravity.CENTER, 0, 0); ImageButton btnCancel = (ImageButton) vwLayout.findViewById(R.id.butcancelmain); btnCancel.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { popmW1.dismiss(); } }); btns[0] = (Button) vwLayout.findViewById(R.id.btn1); btns[1] = (Button) vwLayout.findViewById(R.id.btn2); btns[2] = (Button) vwLayout.findViewById(R.id.btn3); btns[3] = (Button) vwLayout.findViewById(R.id.btn4); btns[4] = (Button) vwLayout.findViewById(R.id.btn5); btns[5] = (Button) vwLayout.findViewById(R.id.btn6); btns[6] = (Button) vwLayout.findViewById(R.id.btn7); btns[7] = (Button) vwLayout.findViewById(R.id.btn8); btns[8] = (Button) vwLayout.findViewById(R.id.btn9); for (int inI = 0; inI < 9; inI++) { btns[inI].setText(spMemory.getString("" + inI, "0")); final int inJ = inI; btns[inJ].setText(spMemory.getString("" + inJ, "")); btns[inJ].setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { btns[inJ].setText(strTemp); editor = spMemory.edit(); editor.putString("" + inJ, btns[inJ].getText().toString().equalsIgnoreCase("") ? "" : btns[inJ].getText().toString()); editor.commit(); popmW1.dismiss(); } }); } inShift = 0; } else Toast.makeText(ctx, "Save Failed!", Toast.LENGTH_SHORT).show(); }
From source file:com.sft.fragment.SchoolsFragment.java
private void showPopupWindow(View parent) { if (popupWindow == null) { View view = View.inflate(mContext, R.layout.pop_window, null); TextView c1Car = (TextView) view.findViewById(R.id.pop_window_one); c1Car.setText(R.string.c1_automatic_gear_car); TextView c2Car = (TextView) view.findViewById(R.id.pop_window_two); c2Car.setText(R.string.c2_manual_gear_car); TextView other = (TextView) view.findViewById(R.id.pop_window_three); other.setText(R.string.other);//ww w. jav a 2 s.c o m other.setOnClickListener(this); c1Car.setOnClickListener(this); c2Car.setOnClickListener(this); popupWindow = new PopupWindow(view, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); } popupWindow.setFocusable(true); popupWindow.setOutsideTouchable(true); // Back??? popupWindow.setBackgroundDrawable(new BitmapDrawable()); // WindowManager windowManager = (WindowManager) // getSystemService(Context.WINDOW_SERVICE); // int xPos = -popupWindow.getWidth() / 2 // + getCustomTitle().getCenter().getWidth() / 2; popupWindow.showAsDropDown(parent); }
From source file:com.sft.blackcatapp.EnrollSchoolActivity.java
private void showOpenCityPopupWindow(View parent) { if (openCityPopupWindow == null) { LinearLayout popWindowLayout = (LinearLayout) View.inflate(mContext, R.layout.pop_window, null); popWindowLayout.removeAllViews(); // LinearLayout popWindowLayout = new LinearLayout(mContext); popWindowLayout.setOrientation(LinearLayout.VERTICAL); ListView OpenCityListView = new ListView(mContext); OpenCityListView.setDividerHeight(0); OpenCityListView.setCacheColorHint(android.R.color.transparent); OpenCityListView.setOnItemClickListener(new OnItemClickListener() { @Override// ww w . jav a 2 s.com public void onItemClick(AdapterView<?> parent, View view, int position, long id) { OpenCityVO selectCity = openCityList.get(position); System.out.println(selectCity.getName()); cityname = selectCity.getName(); licensetype = ""; schoolname = ""; ordertype = ""; index = 1; obtainNearBySchool(); openCityPopupWindow.dismiss(); openCityPopupWindow = null; } }); LinearLayout.LayoutParams param = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); popWindowLayout.addView(OpenCityListView, param); OpenCityAdapter openCityAdapter = new OpenCityAdapter(mContext, openCityList); OpenCityListView.setAdapter(openCityAdapter); openCityPopupWindow = new PopupWindow(popWindowLayout, 130, LayoutParams.WRAP_CONTENT); } openCityPopupWindow.setFocusable(true); openCityPopupWindow.setOutsideTouchable(true); // Back??? openCityPopupWindow.setBackgroundDrawable(new BitmapDrawable()); openCityPopupWindow.showAsDropDown(parent); }
From source file:com.huofu.RestaurantOS.ui.splash.activate.java
/** * ?/*from ww w . j a v a 2 s.c o m*/ */ public void showLoadingDialog(String text) { LayoutInflater inflater = (LayoutInflater) ctxt.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View grid = inflater.inflate(R.layout.loading_layout, null); TextView tv = (TextView) grid.findViewById(R.id.textview_loading_content); tv.setText(text); ImageView iv = (ImageView) grid.findViewById(R.id.imageview_loading_pic); iv.startAnimation(AnimationUtils.loadAnimation(ctxt, R.anim.rotate_loading)); int width = CommonUtils.getScreenWidth(ctxt); int height = CommonUtils.getScreenHeight(ctxt); if (dialog_loading == null) { dialog_loading = new PopupWindow(grid, width, height, true); } else { dialog_loading.setContentView(grid); } dialog_loading.setFocusable(true); dialog_loading.setOutsideTouchable(true); dialog_loading.setAnimationStyle(R.style.AutoDialogAnimation); dialog_loading.setBackgroundDrawable(new BitmapDrawable()); if (hasFocus) { dialog_loading.showAtLocation(rl_activate, Gravity.NO_GRAVITY, 0, 0); } }
From source file:com.cybrosys.scientific.EventListener.java
@SuppressWarnings("deprecation") public void showHistory() { shPref = ScientificActivity.ctx.getSharedPreferences("myHistpref", 0); int inSize = shPref.getInt("HistIndex", 0); System.out.println("" + inSize); String[] str = new String[inSize]; for (int inI = 0; inI < inSize; inI++) { str[inI] = shPref.getString("hist" + inI, ""); System.out.println(str[inI]); }// w ww . j a va 2 s. c o m LayoutInflater inflater = (LayoutInflater) ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE); vwLayout = inflater.inflate(R.layout.pop_history, (ViewGroup) ((Activity) ctx).findViewById(R.id.popup_element)); popmW1 = new PopupWindow(vwLayout, PalmCalcActivity.inDispwidth, PalmCalcActivity.inDispheight, true); popmW1.setBackgroundDrawable(new BitmapDrawable()); popmW1.setOutsideTouchable(true); popmW1.showAtLocation(vwLayout, Gravity.CENTER, 0, 0); tblltTable = (TableLayout) vwLayout.findViewById(R.id.tablelay); ImageButton btnCancel = (ImageButton) vwLayout.findViewById(R.id.butcancelmain); btnCancel.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { popmW1.dismiss(); } }); txtvHistory = new TextView[inSize]; btnHistory = new Button[inSize]; tblrRowL = new TableRow[inSize]; TableRow.LayoutParams buttonParams = new TableRow.LayoutParams(TableRow.LayoutParams.FILL_PARENT, TableRow.LayoutParams.WRAP_CONTENT, 1f); TableRow.LayoutParams textParams = new TableRow.LayoutParams(TableRow.LayoutParams.FILL_PARENT, TableRow.LayoutParams.WRAP_CONTENT, .1f); int inJ = 0, inL = inSize - 1; for (int inI = 0; inI < inSize; inI++) { if (!str[inI].equalsIgnoreCase("")) { btnHistory[inJ] = new Button(ctx); txtvHistory[inJ] = new TextView(ctx); txtvHistory[inJ].setText("" + (inJ + 1)); txtvHistory[inJ].setGravity(Gravity.CENTER); txtvHistory[inJ].setTextColor(ScientificActivity.ctx.getResources().getColor(R.color.HistColor)); txtvHistory[inJ].setLayoutParams(textParams); btnHistory[inJ].setText(str[inL]); btnHistory[inJ].setTextColor(Color.WHITE); btnHistory[inJ].setGravity(Gravity.LEFT); btnHistory[inJ].setLayoutParams(buttonParams); btnHistory[inJ].setBackgroundDrawable(ctx.getResources().getDrawable(R.drawable.button_effect)); tblrRowL[inJ] = new TableRow(ctx); tblrRowL[inJ].addView(txtvHistory[inJ]); tblrRowL[inJ].addView(btnHistory[inJ]); tblltTable.addView(tblrRowL[inJ]); final int inK = inJ; btnHistory[inK].setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // etxt.setText(btns[inK].getText().toString()); mHandler.insert(btnHistory[inK].getText().toString()); popmW1.dismiss(); } }); inJ++; inL--; } } if (inSize == 0) { TextView txtvHistory = new TextView(ctx); txtvHistory.setLayoutParams(textParams); txtvHistory.setGravity(Gravity.CENTER); txtvHistory.setTextColor(Color.WHITE); txtvHistory.setText("History Empty"); TableRow tblrRowL = new TableRow(ctx); tblrRowL.addView(txtvHistory); tblltTable.addView(tblrRowL); } }
From source file:com.fullteem.yueba.app.ui.ChatActivity.java
/** * window// w w w . j a va 2s . c o m */ private void windowShow() { if (popupWindow == null) { LayoutInflater layoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); menuView = layoutInflater.inflate(R.layout.popwindow_msgmenu, null); listviewMsgMenus = (ListView) menuView.findViewById(R.id.listviewMsgPop); mma = new MessageMenuAdapter(this, menuTexts); listviewMsgMenus.setAdapter(mma); // PopuWidow popupWindow = new PopupWindow(menuView, 300, 500); } // ? popupWindow.setFocusable(true); // ? popupWindow.setOutsideTouchable(true); // Back??? popupWindow.setBackgroundDrawable(new BitmapDrawable()); WindowManager windowManager = (WindowManager) getSystemService(Context.WINDOW_SERVICE); // ?:??-PopupWindow? int xPos = windowManager.getDefaultDisplay().getWidth() / 2 - popupWindow.getWidth() / 2; Log.i("coder", "windowManager.getDefaultDisplay().getWidth()/2:" + windowManager.getDefaultDisplay().getWidth() / 2); // Log.i("coder", "popupWindow.getWidth()/2:" + popupWindow.getWidth() / 2); Log.i("coder", "xPos:" + xPos); popupWindow.showAsDropDown(viewBtnMore, xPos, 0); listviewMsgMenus.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) { if (popupWindow != null) { popupWindow.dismiss(); } // if (menuTexts[position].equals("")) { String strName = getString(R.string.add_firend); String msg = String.format(strName, userNickName); popMenu = new CommonPopWindow(ChatActivity.this, msg, new OnClickListener() { @Override public void onClick(View v) { addContact(); addFriendPop.dismiss(); } }, new OnClickListener() { @Override public void onClick(View v) { addFriendPop.dismiss(); } }); // ? popMenu.setIsEditText(false); // popMenu.preperShow(); addFriendPop = popMenu.getMenu(); addFriendPop.setOutsideTouchable(true); if (addFriendPop == null) { return; } if (addFriendPop.isShowing()) { addFriendPop.dismiss(); return; } addFriendPop.showAtLocation(getWindow().getDecorView(), Gravity.CENTER, 0, 0); } else if (menuTexts[position].equals("?")) { } // ? else if (menuTexts[position].equals("")) { // try { // EMContactManager.getInstance().deleteContact( // toChatUsername); // } catch (EaseMobException e) { // showToast(""); // } deleteFriends(); } else if (menuTexts[position].equals("?")) {// bill Intent intentDatePublish = new Intent(ChatActivity.this, DatePublishActivity.class); // TODO ????id,????????idname DBFriendListDao friendListDao = new DBFriendListDao(ChatActivity.this); UserCommonModel um = friendListDao.getContacter(toChatUsername); if (um == null) return; UmengUtil.onEvent(ChatActivity.this, "friend_chat_access_post_date_button_hits"); LogUtil.printUmengLog("friend_chat_access_post_date_button_hits"); intentDatePublish.putExtra(GlobleConstant.DATE_FAVORITE_ID, Integer.valueOf(TextUtils.isEmpty(um.getUserId()) ? "0" : um.getUserId())); // userIdint intentDatePublish.putExtra(GlobleConstant.DATE_FAVORITE_NAME, um.getUserName()); // String intentDatePublish.putExtra(GlobleConstant.DATE_FAVORITE_MOBILE, um.getUserMobile()); intentDatePublish.putExtra(GlobleConstant.DATE_FAVORITE_URL, um.getUserLogoUrl()); intentDatePublish.putExtra("isExist", true); startActivity(intentDatePublish); } else if (menuTexts[position].equals("")) { HttpRequest.getInstance(ChatActivity.this).getOutGroup(appContext.getUserInfo().getUserMobile(), toChatUsername, new CustomAsyncResponehandler() { @Override public void onSuccess(ResponeModel baseModel) { if (baseModel != null && baseModel.isStatus()) { showToast("?"); finish(); return; } showToast(getString(R.string.hint_operationError)); } @Override public void onFailure(Throwable error, String content) { showToast(getString(R.string.hint_operationError)); } }); } } }); }
From source file:com.huofu.RestaurantOS.ui.splash.activate.java
/** * ?/*from ww w. j av a 2s .c o m*/ * * @param msg: * @param result:-1->? 0-??? */ public void showDialogError(String msg, final int result) { LayoutInflater inflater = (LayoutInflater) ctxt.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View grid = inflater.inflate(R.layout.dialog_show_error_one_option, null); TextView tvContent = (TextView) grid.findViewById(R.id.tv_dialog_error_content); final Button btn_close = (Button) grid.findViewById(R.id.btn_dialog_error_close); tvContent.setText(msg); OnClickListener ocl = new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub if (v.getId() == btn_close.getId()) { if (dialog_show_error != null) { if (dialog_show_error.isShowing()) { dialog_show_error.dismiss(); } } if (result == -1) { finishWithNextActivity(LoginActivity.class); } } } }; btn_close.setOnClickListener(ocl); int width = CommonUtils.getScreenWidth(ctxt); int height = CommonUtils.getScreenHeight(ctxt); if (dialog_show_error == null) { dialog_show_error = new PopupWindow(grid, width, height, true); } dialog_show_error.setBackgroundDrawable(new BitmapDrawable()); dialog_show_error.setContentView(grid); dialog_show_error.setFocusable(true); dialog_show_error.setOutsideTouchable(true); dialog_show_error.setAnimationStyle(R.style.AutoDialogAnimation); try { dialog_show_error.showAtLocation(rl_activate, Gravity.NO_GRAVITY, 0, 0); } catch (Exception e) { } }
From source file:com.cybrosys.scientific.EventListener.java
@SuppressWarnings("deprecation") @SuppressLint("NewApi") @Override/*from ww w . j a va 2 s . c om*/ public void onClick(View vwView) { vibrate(); ctx = PalmCalcActivity.ctx; int id = vwView.getId(); ScientificActivity.txtvShift.setText(""); switch (id) { case R.id.buttonDel: mHandler.onDelete(); break; case R.id.button3: if (inShift == 0) mHandler.insert("3"); else { mHandler.insert(","); inShift = 0; } break; case R.id.buttonDot: if (inShift == 0) mHandler.insert("."); else { showD(); inShift = 0; } break; case R.id.buttonAC: mHandler.onClear(); break; case R.id.ButtonEqual: String strDisplayEq = mHandler.getDisplayText(); if (!strDisplayEq.equalsIgnoreCase("")) mHandler.onEnter(); break; case R.id.ButtonAns: if (inShift == 0) mHandler.onShow(); else { showHistory(); inShift = 0; } break; case R.id.buttonDeg: mHandler.onDegChange(); break; case R.id.buttonAlt: if (inShift == 0) { String[] strMode = new String[] { "Floatpt", "FIX", "SCI" }; int inSizeM = 3; LayoutInflater inflater = (LayoutInflater) ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE); vwLayout = inflater.inflate(R.layout.pop_history, (ViewGroup) ((Activity) ctx).findViewById(R.id.popup_element)); TextView txtvHeaderPop = (TextView) vwLayout.findViewById(R.id.txtvHeaderPop); txtvHeaderPop.setText("MODE"); popmW1 = new PopupWindow(vwLayout, PalmCalcActivity.inDispwidth, PalmCalcActivity.inDispheight, true); popmW1.setBackgroundDrawable(new BitmapDrawable()); popmW1.setOutsideTouchable(true); popmW1.showAtLocation(vwLayout, Gravity.CENTER, 0, 0); tblltTable = (TableLayout) vwLayout.findViewById(R.id.tablelay); ImageButton btnCancel = (ImageButton) vwLayout.findViewById(R.id.butcancelmain); btnCancel.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { popmW1.dismiss(); } }); txtvHistory = new TextView[inSizeM]; btnHistory = new Button[inSizeM]; tblrRowL = new TableRow[inSizeM]; TableRow.LayoutParams buttonParams = new TableRow.LayoutParams(TableRow.LayoutParams.FILL_PARENT, TableRow.LayoutParams.WRAP_CONTENT, 1f); TableRow.LayoutParams textParams = new TableRow.LayoutParams(TableRow.LayoutParams.FILL_PARENT, TableRow.LayoutParams.WRAP_CONTENT, .1f); int inJ = 0; for (int inI = 0; inI < inSizeM; inI++) { btnHistory[inJ] = new Button(ctx); txtvHistory[inJ] = new TextView(ctx); txtvHistory[inJ].setText("" + (inJ + 1)); txtvHistory[inJ].setLayoutParams(textParams); btnHistory[inJ].setText(strMode[inI]); txtvHistory[inJ].setGravity(Gravity.CENTER); txtvHistory[inJ] .setTextColor(ScientificActivity.ctx.getResources().getColor(R.color.HistColor)); btnHistory[inJ].setTextColor(Color.WHITE); btnHistory[inJ].setGravity(Gravity.LEFT); btnHistory[inJ].setLayoutParams(buttonParams); btnHistory[inJ].setBackgroundDrawable(ctx.getResources().getDrawable(R.drawable.button_effect)); tblrRowL[inJ] = new TableRow(ctx); tblrRowL[inJ].addView(txtvHistory[inJ]); tblrRowL[inJ].addView(btnHistory[inJ]); tblltTable.addView(tblrRowL[inJ]); final int inK = inJ; btnHistory[inK].setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // etxt.setText(btns[inK].getText().toString()); ScientificActivity.txtvFSE.setText(btnHistory[inK].getText().toString()); popmW1.dismiss(); } }); inJ++; } } else { setFSE(); inShift = 0; } mHandler.onFSEChange(); break; case R.id.buttonShift: if (inShift == 0) { inShift = 1; mHandler.onShiftPress(); } else inShift = 0; break; case R.id.buttonHyp: if (inHyp == 0) { inHyp = 1; mHandler.onHypPress(); } else { inHyp = 0; ScientificActivity.txtvHyp.setText(""); } break; case R.id.buttonMS: mHandler.onEnter(); String strDisplay = mHandler.getDisplayText(); if (inShift == 0) { if (isValidNumber(strDisplay)) { PreferenceClass.setMyStringPref(ctx, strDisplay); Toast.makeText(ctx, "Memory Saved!", Toast.LENGTH_SHORT).show(); mHandler.onClear(); } else Toast.makeText(ctx, "Save Failed!", Toast.LENGTH_SHORT).show(); } else { Memstore(); } break; case R.id.buttonMR: if (inShift == 0) { String strPref = PreferenceClass.getMyStringPref(ctx); if (!strPref.equalsIgnoreCase("")) { mHandler.insert(strPref); } else Toast.makeText(ctx, "Empty", Toast.LENGTH_SHORT).show(); } else { Memread(); inShift = 0; } break; case R.id.buttonMp: mHandler.onEnter(); String strDisplay2 = mHandler.getDisplayText(); if (isValidNumber(strDisplay2)) { String strPref2 = PreferenceClass.getMyStringPref(ctx); if (!strPref2.equalsIgnoreCase("")) { if (inShift == 0) { try { PreferenceClass.setMyStringPref(ctx, "" + mSymbols.eval(strPref2 + "+" + strDisplay2)); mHandler.onClear(); } catch (SyntaxException e) { e.printStackTrace(); } Toast.makeText(ctx, "Value added", Toast.LENGTH_SHORT).show(); } else { Memplus(); inShift = 0; } } } break; default: if (vwView instanceof Button) { String strText = ((Button) vwView).getTag().toString(); if (strText.contains(",")) { int inInComa = strText.lastIndexOf(","); if (inShift == 1) { strText = strText.substring(inInComa + 1, strText.length()); inShift = 0; } else { strText = strText.substring(0, inInComa); } } if (inHyp == 1) { if (strText.contains("sin(")) { strText = strText.replace("sin(", "sinh("); } if (strText.contains("cos(")) { strText = strText.replace("cos(", "cosh("); } if (strText.contains("tan(")) { strText = strText.replace("tan(", "tanh("); } ScientificActivity.txtvHyp.setText(""); inHyp = 0; } mHandler.insert(strText); } } }