This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@40b47bd8 is not valid; is your activity running? | |
| at android.view.ViewRoot.setView(ViewRoot.java:452) | |
| at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:283) | |
| at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:193) | |
| at android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:118) | |
| at android.view.Window$LocalWindowManager.addView(Window.java:532) | |
| at android.app.Dialog.show(Dialog.java:269) | |
| ... | |
| --------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vHolder.txtWalletDebit.setText(new BigDecimal(mMyWallet.get(position).getDebit()).toPlainString()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (login.getPatient_profile() instanceof PatientProfile){ | |
| System.out.print("--------------->????--Is an intanceOf"); | |
| startMainActivity(true); | |
| } | |
| else { | |
| System.out.print("----nnoooo-------->????--Not an intanceOf"); | |
| startMainActivity(false); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class UtilDateTimeConv { | |
| //FORMAT THE SERVER IS SENDING DATE & TIME ----- > yyyy-MM-dd'T'hh:mm:ss | |
| //////////////////////////// FORMAT - ONE - DETAILS //////////////////////////////// | |
| //FORMAT-ONE-DATE ------------------------------ > MMM dd, yyyy --- > JULY 05, 2015 | |
| //FORMAT-ONE-TIME ------------------------------ > hh:mm a -------- > 5:45 PM | |
| //////////////////////////// FORMAT - ONE - DETAILS //////////////////////////////// | |
| //FORMAT-ONE-DATE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void removeAt(int position) { | |
| items.remove(position); | |
| notifyItemRemoved(position); | |
| notifyItemRangeChanged(position, items.size()); | |
| } | |
| public void clearAll() { | |
| items.clear(); | |
| notifyDataSetChanged(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (!android.util.Patterns.EMAIL_ADDRESS.matcher(emailId).matches()){ | |
| inputemail.setError(inputemail.getResources().getString(R.string.mail_Id_invalid)); | |
| valid = false; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //SOURCE: http://stackoverflow.com/questions/16889502/how-to-mask-an-edittext-to-show-the-dd-mm-yyyy-date-format | |
| EditText date; | |
| date = (EditText)findViewById(R.id.whichdate); | |
| date.addTextChangedListener(tw); | |
| TextWatcher tw = new TextWatcher() { | |
| private String current = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ExpandableListAdapter.java | | |
| --------------------------------------- | |
| import android.content.Context; | |
| import android.support.v7.widget.CardView; | |
| import android.support.v7.widget.RecyclerView; | |
| import android.view.LayoutInflater; | |
| import android.view.View; | |
| import android.view.ViewGroup; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| How to Use: | |
| AppController.java is a Application class | |
| RequestQueueHelperWithTimeout.java, GsonRequest.java are the Util classes | |
| ........ | |
| Gradle: | |
| compile 'com.google.code.gson:gson:2.3.1' | |
| compile 'com.google.code.gson:gson:2.3.1' | |
| compile 'com.mcxiaoke.volley:library:1.0.18' | |
| compile('org.apache.httpcomponents:httpmime:4.3.6') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private void plotAllThePoints() { | |
| InputStream source = new ByteArrayInputStream(mWord.getPatternMetaData().getBytes()); | |
| Reader reader = new InputStreamReader(source); | |
| retraceData = gson.fromJson(reader, DataSetTwo.class); | |
| Toast.makeText(ActDrawAreaTwo.this,retraceData.getStroke_points().get(0).getMain_dots().get(0).getDotOne().toString(),Toast.LENGTH_LONG).show(); | |
| } |