| | |
| | | import android.os.Bundle; |
| | | import android.text.TextUtils; |
| | | import android.view.WindowManager; |
| | | import android.widget.ImageView; |
| | | import android.widget.TextView; |
| | | |
| | | |
| | | import com.bumptech.glide.Glide; |
| | | import com.hdl.photovoltaic.R; |
| | | import com.hdl.photovoltaic.base.BaseDialog; |
| | | |
| | |
| | | setCanceledOnTouchOutside(false); |
| | | setContentView(R.layout.loading_alert); |
| | | content = (TextView) findViewById(R.id.load_content_tv); |
| | | ImageView imageView = (ImageView) findViewById(R.id.load_pb); |
| | | WindowManager.LayoutParams params = getWindow().getAttributes(); |
| | | params.width = WindowManager.LayoutParams.WRAP_CONTENT; |
| | | params.height = WindowManager.LayoutParams.WRAP_CONTENT; |
| | | getWindow().setAttributes(params); |
| | | Glide.with(context) |
| | | // .asBitmap() // 强制作为静态图片加载 |
| | | .load(R.drawable.loading) |
| | | .into(imageView); |
| | | // content.setText(R.string.device_加载中); |
| | | } |
| | | |