GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 添加幸运转盘 · tmexcept/AndroidCustomView@4088c23

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • app/src/main
    • java/com/allen/androidcustomview
      • activity
        • TranslateRotateCanvasActivity.java
      • widget
        • TranslateRotateView.java
    • res
      • layout
        • activity_tranlate_rotate.xml
      • mipmap-xxhdpi
        • ic_gift_banana.png
        • ic_gift_egg.png
        • ic_gift_kiss.png
        • ic_gift_star.png
        • wheel_big_bg.png
        • wheel_big_bottom.png
        • wheel_big_btn.png
        • wheel_big_btn_bg.png
        • wheel_big_btn_click.png
        • wheel_big_center.png
        • wheel_big_in.png
        • wheel_big_out.png
        • wheel_big_title.png
        • wheel_small_bg.png
        • wheel_small_bottom.png
        • wheel_small_btn.png
        • wheel_small_btn_bg.png
        • wheel_small_btn_click.png
        • wheel_small_center.png
        • wheel_small_in.png
        • wheel_small_out.png
        • wheel_small_title.png
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎app/src/main/java/com/allen/androidcustomview/activity/TranslateRotateCanvasActivity.java‎

Copy file name to clipboardExpand all lines: app/src/main/java/com/allen/androidcustomview/activity/TranslateRotateCanvasActivity.java
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,25 @@
66
import android.view.View;
77

88
import com.allen.androidcustomview.R;
9+
import com.allen.androidcustomview.widget.LuckyWheelAnimView;
910
import com.allen.androidcustomview.widget.UserStarChangeView;
1011

1112
public class TranslateRotateCanvasActivity extends AppCompatActivity {
1213

1314
UserStarChangeView userStarChangeView;
15+
LuckyWheelAnimView luckyWheelAnimView;
1416
@Override
1517
protected void onCreate(@Nullable Bundle savedInstanceState) {
1618
super.onCreate(savedInstanceState);
1719
setContentView(R.layout.activity_tranlate_rotate);
1820

1921
userStarChangeView = findViewById(R.id.userStarChangeView);
22+
luckyWheelAnimView = findViewById(R.id.luckyWheelAnimView);
2023
}
2124

25+
public void luckyWheelAnim(View view){
26+
luckyWheelAnimView.setSmall();
27+
}
2228

2329
int leveStar = 0;
2430
public void StarUp(View view) {
Collapse file

‎app/src/main/java/com/allen/androidcustomview/widget/TranslateRotateView.java‎

Copy file name to clipboardExpand all lines: app/src/main/java/com/allen/androidcustomview/widget/TranslateRotateView.java
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ protected void onDraw(Canvas canvas) {
3232
canvas.rotate(45);
3333
canvas.drawRect(0,0,50,100, mPaint);
3434

35-
// canvas.save();
35+
canvas.save();
3636
mPaint.setColor(0xff00ff00);
37-
// canvas.rotate(45);
38-
// canvas.translate(200, 100);
39-
// canvas.drawRect(200,200,250,300, mPaint);
40-
// canvas.restore();
37+
canvas.rotate(45);
38+
canvas.translate(200, 100);
39+
canvas.drawRect(200,200,250,300, mPaint);
40+
canvas.restore();
4141
}
4242
}
Collapse file

‎app/src/main/res/layout/activity_tranlate_rotate.xml‎

Copy file name to clipboardExpand all lines: app/src/main/res/layout/activity_tranlate_rotate.xml
+18-4Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,42 @@
1616
android:layout_height="307dp"
1717
android:layout_gravity="center"/>
1818

19+
<com.allen.androidcustomview.widget.LuckyWheelAnimView
20+
android:id="@+id/luckyWheelAnimView"
21+
android:layout_width="match_parent"
22+
android:layout_height="300dp"
23+
android:layout_gravity="center_vertical"/>
24+
25+
<Button
26+
android:layout_width="100dp"
27+
android:layout_height="50dp"
28+
android:onClick="luckyWheelAnim"
29+
android:layout_marginBottom="50dp"
30+
android:layout_gravity="bottom"
31+
android:text="旋轉老虎機"/>
32+
1933
<LinearLayout
2034
android:layout_width="match_parent"
2135
android:layout_height="wrap_content"
2236
android:layout_gravity="bottom">
2337
<Button
2438
android:layout_width="100dp"
25-
android:layout_height="100dp"
39+
android:layout_height="50dp"
2640
android:onClick="StarUp"
2741
android:text="升星"/>
2842
<Button
2943
android:layout_width="100dp"
30-
android:layout_height="100dp"
44+
android:layout_height="50dp"
3145
android:onClick="levelUp"
3246
android:text="升等级"/>
3347
<Button
3448
android:layout_width="100dp"
35-
android:layout_height="100dp"
49+
android:layout_height="50dp"
3650
android:onClick="starDown"
3751
android:text="降星"/>
3852
<Button
3953
android:layout_width="100dp"
40-
android:layout_height="100dp"
54+
android:layout_height="50dp"
4155
android:onClick="levelDown"
4256
android:text="降等级"/>
4357
</LinearLayout>
Collapse file

‎app/src/main/res/mipmap-xxhdpi/ic_gift_banana.png‎

Copy file name to clipboard
23.3 KB
  • Display the source diff
  • Display the rich diff
Loading
Collapse file

‎app/src/main/res/mipmap-xxhdpi/ic_gift_egg.png‎

Copy file name to clipboard
18.8 KB
  • Display the source diff
  • Display the rich diff
Loading
Collapse file

‎app/src/main/res/mipmap-xxhdpi/ic_gift_kiss.png‎

Copy file name to clipboard
11.3 KB
  • Display the source diff
  • Display the rich diff
Loading
Collapse file

‎app/src/main/res/mipmap-xxhdpi/ic_gift_star.png‎

Copy file name to clipboard
7.5 KB
  • Display the source diff
  • Display the rich diff
Loading
Collapse file

‎app/src/main/res/mipmap-xxhdpi/wheel_big_bg.png‎

Copy file name to clipboard
142 KB
  • Display the source diff
  • Display the rich diff
Loading
Collapse file

‎app/src/main/res/mipmap-xxhdpi/wheel_big_bottom.png‎

Copy file name to clipboard
111 KB
  • Display the source diff
  • Display the rich diff
Loading
Collapse file

‎app/src/main/res/mipmap-xxhdpi/wheel_big_btn.png‎

Copy file name to clipboard
21.2 KB
  • Display the source diff
  • Display the rich diff
Loading

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.