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 — 新增进度view · tmexcept/AndroidCustomView@db24971

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .idea
    • misc.xml
  • app/src/main
    • java/com/allen/androidcustomview
      • activity
        • ProgressBarActivity.java
      • widget
        • LoadingView.java
        • ProductProgressBar.java
    • res/layout
      • activity_bubble_view.xml
      • activity_pregress_bar.xml
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.idea/misc.xml‎

Copy file name to clipboardExpand all lines: .idea/misc.xml
+1-14Lines changed: 1 addition & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

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

Copy file name to clipboardExpand all lines: app/src/main/java/com/allen/androidcustomview/activity/ProgressBarActivity.java
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,27 @@
22

33
import android.support.v7.app.AppCompatActivity;
44
import android.os.Bundle;
5+
import android.util.Log;
56
import android.view.View;
67
import android.widget.Button;
78
import android.widget.TextView;
89

910
import com.allen.androidcustomview.R;
1011
import com.allen.androidcustomview.widget.CircleProgressBarView;
1112
import com.allen.androidcustomview.widget.HorizontalProgressBar;
13+
import com.allen.androidcustomview.widget.LoadingView;
14+
import com.allen.androidcustomview.widget.ProductProgressBar;
1215

1316
public class ProgressBarActivity extends AppCompatActivity {
1417

1518
CircleProgressBarView circleProgressBarView;
1619
HorizontalProgressBar horizontalProgressBar;
20+
ProductProgressBar productProgressBar;
21+
LoadingView loadingView;
1722
TextView textView;
1823

1924
Button button;
25+
2026
@Override
2127
protected void onCreate(Bundle savedInstanceState) {
2228
super.onCreate(savedInstanceState);
@@ -25,6 +31,8 @@ protected void onCreate(Bundle savedInstanceState) {
2531
circleProgressBarView = (CircleProgressBarView) findViewById(R.id.circle_progress_view);
2632

2733
horizontalProgressBar = (HorizontalProgressBar) findViewById(R.id.horizontal_progress_view);
34+
productProgressBar = (ProductProgressBar) findViewById(R.id.product_progress_view);
35+
loadingView = (LoadingView) findViewById(R.id.loading_view);
2836

2937
textView = (TextView) findViewById(R.id.progress_tv);
3038
button = (Button) findViewById(R.id.startAnimationBtn);
@@ -45,11 +53,21 @@ public void currentProgressListener(float currentProgress) {
4553
});
4654
horizontalProgressBar.startProgressAnimation();
4755

56+
productProgressBar.setProgress(60).setProgressListener(new ProductProgressBar.ProgressListener() {
57+
@Override
58+
public void currentProgressListener(float currentProgress) {
59+
Log.e("allen", "currentProgressListener: " + currentProgress);
60+
}
61+
});
62+
63+
loadingView.startAnimation();
4864

4965
button.setOnClickListener(new View.OnClickListener() {
5066
@Override
5167
public void onClick(View v) {
68+
loadingView.startAnimation();
5269
horizontalProgressBar.setProgressWithAnimation(100);
70+
productProgressBar.setProgress(100);
5371
circleProgressBarView.setProgressWithAnimation(60).startProgressAnimation();
5472
circleProgressBarView.setProgressListener(new CircleProgressBarView.ProgressListener() {
5573
@Override

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.