VivekPanyam / Evolve

Evolve is a library for Android Developers that lets them deploy new versions of an app without going through Google Play or asking users to download an update.
GNU Affero General Public License v3.0
100 stars 12 forks source link

How show AlertDialog #12

Open developerGM opened 8 years ago

developerGM commented 8 years ago

Hi, I am testing this library but i have a problem if i try to add a Dialog

    AlertDialog.Builder builder = new AlertDialog.Builder(Evolve.context);
    LayoutInflater inflater = LayoutInflater.from(Evolve.context);
    View view = inflater.inflate(R.layout.dialog_notification, null);
    builder.setView(view);
    TextView txt_title = (TextView) view.findViewById(R.id.txt_title);
    AlertDialog dialog = builder.create();
    dialog.show();

This code is from my MainAcitivity that extends DynamicActivity txt_title results null

How is possible ? If I use MainActivity.this instead of Evolve.context, txt_title works but I have a problem on .show()

So, how can I solve ? Thanks