标签:android style blog color io ar art div cti
final Dialog customDialog = new Dialog(this); customDialog.setTitle(R.string.attention); customDialog.setContentView(R.layout.connectionview); ImageView image = (ImageView)customDialog.findViewById(R.id.anim); image.setBackgroundResource(R.drawable.connection); customDialog.setOnShowListener(new DialogInterface.OnShowListener(){ public void onShow(android.content.DialogInterface dialog){ ImageView image =(ImageView)customDialog.findViewById(R.id.anim); AnimationDrawable ad = (AnimationDrawable)image.getBackground(); if(ad != null) { ad.start(); } } }); customDialog.show(); 这里利用的onShowListener,注意这个接口需要高版本的SDK。
标签:android style blog color io ar art div cti
原文地址:http://www.cnblogs.com/niray/p/3953138.html