bash,openssl version,
``,,这将显示OpenSSL的版本信息。bash,openssl version,
``,,这将显示OpenSSL的版本信息。whoami
来查看当前登录的用户名;在Linux或MacOS系统中,同样可以使用whoami
命令。java,public class LuckyWheel extends View {, private Paint paint;, private int[] colors = {Color.RED, Color.GREEN, Color.BLUE, Color.YELLOW};, private String[] texts = {"奖品1", "奖品2", "奖品3", "奖品4"};, private int centerX, centerY, radius;,, public LuckyWheel(Context context) {, super(context);, init();, },, private void init() {, paint = new Paint();, paint.setAntiAlias(true);, paint.setTextSize(50);, paint.setStyle(Paint.Style.FILL);, },, @Override, protected void onDraw(Canvas canvas) {, super.onDraw(canvas);, centerX = getWidth() / 2;, centerY = getHeight() / 2;, radius = Math.min(centerX, centerY) 100;,, for (int i = 0; i< 4; i++) {, paint.setColor(colors[i]);, canvas.drawArc(new RectF(centerX radius, centerY radius, centerX + radius, centerY + radius), i * 90 45, 90, true, paint);, drawText(canvas, i);, }, },, private void drawText(Canvas canvas, int index) {, paint.setColor(Color.WHITE);, float angle = (index * 90 + 45) * (float) Math.PI / 180;, float x = (float) (centerX + radius * Math.cos(angle));, float y = (float) (centerY + radius * Math.sin(angle));, canvas.drawText(texts[index], x, y, paint);, },},
``ExpandableTextView
或自定义View实现可点击展开的TextView。Powered By Z-BlogPHP 1.7.3