android - Change a WebView Gif programmatically via spinner selection -


I put a web villa in one piece to show a gif animation. It works entirely webbie class:

When I want to stop the GI animation and change it to another GIF by spinner selection in my piece:

  mySpinner.setOnItemSelectedListener (new OnItemSelectedListener () {@Override public void onItemSelected (AdapterView & LT ;? & gt; parent, views, Int position, long id) {int posit = parent.getSelectedItemPosition (); PertSpinner .setPopupBackgroundResource (R.color.white); pertSpinner.setValConfirmed (with ); List (see approval) {case 0: toplayout.removeAllViewsInLayout (); view = new GifWebView (getActivity (), "acqua"); toplayout.addView (see); break; case 1: toplayout.removeAllViewsInLayout (); = New GifWebView (getActivity (), "aria"); toplayout.addView (see); breakdown;}} @OtherRide Nothing selected at public zero (adapter view & lt ;? & Gt; Parents) {// other interfaces callback}}); And  GIF:  

   

The app does not change the default GIF with this code. ? Any help will be apreciated !!

solution:

  list (Pojit) {case 0: toplayout .removeAllViewsInLayout (); See = new GifWebView (getActivity (), "aria"); Toplayout.addView (see); Toplayout.setVisibility (View.VISIBLE); break; Case 1: toplayout.removeAllViewsInLayout (); See = new GifWebView (getActivity (), "acqua"); Toplayout.addView (see); break; }  


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -