protected final void onCreate(Bundle bundle) {
super.onCreate(bundle);
Context context = getContext();
View linearLayout = new LinearLayout(context);
LayoutParams layoutParams = new FrameLayout.LayoutParams(-2, a(context, (float) IntFloatWheelView.DEFAULT_VALUE));
layoutParams.gravity = 17;
linearLayout.setOrientation(0);
linearLayout.setLayoutParams(layoutParams);
Drawable gradientDrawable = new GradientDrawable();
gradientDrawable.setColor(-450944201);
gradientDrawable.setCornerRadius((float) a(context, 5.0f));
linearLayout.setBackgroundDrawable(gradientDrawable);
View imageView = new ImageView(context);
layoutParams = new LinearLayout.LayoutParams(a(context, 20.0f), a(context, 20.0f));
layoutParams.gravity = 16;
layoutParams.setMargins(a(this.a.f, 17.0f), a(this.a.f, 10.0f), a(this.a.f, 8.0f), a(this.a.f, 10.0f));
imageView.setLayoutParams(layoutParams);
imageView.setScaleType(ScaleType.FIT_CENTER);
imageView.setImageDrawable(a(context, a.d));
Animation rotateAnimation = new RotateAnimation(0.0f, 359.0f, 1, 0.5f, 1, 0.5f);
rotateAnimation.setRepeatCount(-1);
rotateAnimation.setDuration(900);
rotateAnimation.setInterpolator(new LinearInterpolator());
imageView.startAnimation(rotateAnimation);
View textView = new TextView(context);
textView.setText(TextUtils.isEmpty(this.a.g) ? a.a : this.a.g);
textView.setTextSize(16.0f);
textView.setTextColor(-1);
layoutParams = new LinearLayout.LayoutParams(-2, -2);
layoutParams.gravity = 16;
layoutParams.setMargins(0, 0, a(context, 17.0f), 0);
textView.setLayoutParams(layoutParams);
linearLayout.addView(imageView);
linearLayout.addView(textView);
setContentView(linearLayout);
setCancelable(false);
}
a.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:boohee_v5.6
作者:
评论列表
文章目录