which my problem is similar to this one: Android: Dialog themed activity not visible but I haven't see anyone answer it.
here is my code:
enter code here
public class QueryAct extends Activity implements OnFocusChangeListener , OnItemClickListener , OnResponseListener , OnStartListener
{ oncreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mAct = this ; setContentView(R.layout.activity_query) ; views = new QueryActViews(mAct) ; searchThread = new SearchThread() ; searchThread.responseListener = this ; searchThread.startListener = this ; intialViews(views) ;
HUtil.checkAppUpdate(this);
}
}
enter code here
and here is the method in class HUtil
enter code here
public static void checkAppUpdate(Context ctx)
{
SharedPreferences sp = ctx.getSharedPreferences(GContst.SP_NAME, Context.MODE_PRIVATE);
boolean not_alarm_update = sp.getBoolean(GContst.NOT_ALARM_UPDATE, false);
if(!not_alarm_update)
{
String update_url = sp.getString(GContst.UPDATE_URL, "");
if(!"".equals(update_url))
{
ctx.startActivity(new Intent(ctx,UpdateDialog.class));
}
}
}
enter code here
and this is my manifest.xml I just set the activity updateDialog's theme like this:
enter code here
android:name=".UpdateDialog"
android:launchMode="singleInstance"
android:theme="@android:style/Theme.Dialog" />
enter code here
.
stackoverflow.comm
No comments:
Post a Comment