android - Why this EditText value's checker work but after correcting the text inside Edittex, getting error -


I have an edit text in my code that accepts values ​​from 100 to 1000. I create a custom toast that has several layers GIF and other as below:

  InputStream stream_loader_gif = null; Try {stream_loader_gif = getAssets () Open ("loader.gif"); } Hold (IOException e) {e.printStackTrace (); } Last GifDecoderView gif_view = new GifDecoderView (getBaseContext (), stream_loader_gif);  

And here's the full chaser:

  if ((TextUtils.isEmpty (et_height.getText). ToString ())) || (Float ParseFloat (et_height.getText). ToString ()) & lt; 100.0) || (Float.prst ((to.String ())> 1000.0)) {layout inflator infator = gatelay input (); See Layout = Inflator.Inflat (R.Letting Warning_Toost_Rebor, find VWBID) (R.Did.Warning_Tost_Raybar_xml); Linear layout GifPresenter = (LinearLayout) layout.findViewById (R.id.gifView_at_toast_at_rebar); GifPresenter.addView (gif_view); Textview text = (textview) layout.findvibid (rttext_t_tast_at_barbar); Text.setText ("The height should be between 100 - 1000"); Text.setTextSize (16); Text.setGravity (Gravity.CENTER); Toast toast = new toast (getApplicationContext ()); Toast. Setgravity (Gravity CNTEERTOL, 0, 0); Toast.setDuration (30000); Toast.setView (layout); Toast.show (); // Return; } And {height_val = float.parts (et_height.getText). ToString ()); }  

After running the code, it actually works fine, shows the desired toast, then I correct the value and the system said: "Unfortunately, ... . "


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -