-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
103 additions
and
55 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
app/src/main/java/com/heyongrui/catloadingview/MainActivity.java
This file was deleted.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
app/src/main/java/com/heyongrui/catmouseview/MainActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.heyongrui.catmouseview; | ||
|
||
import android.graphics.Color; | ||
import android.os.Bundle; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.widget.LinearLayout; | ||
|
||
import com.heyongrui.catmouseview.library.CatMouseDialog; | ||
import com.heyongrui.catmouseview.library.CatMouseView; | ||
|
||
public class MainActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_main); | ||
CatMouseView loadingview = findViewById(R.id.loadingview1); | ||
LinearLayout group = findViewById(R.id.loadingview2); | ||
findViewById(R.id.button1).setOnClickListener(view -> { | ||
CatMouseDialog loadingDialog = new CatMouseDialog(MainActivity.this); | ||
loadingDialog.show(); | ||
}); | ||
findViewById(R.id.button2).setOnClickListener(view -> { | ||
boolean running = loadingview.isRunning(); | ||
if (running) { | ||
loadingview.stopAnim(); | ||
} else { | ||
loadingview.startAnim(); | ||
} | ||
}); | ||
findViewById(R.id.button3).setOnClickListener(view -> { | ||
group.removeAllViews(); | ||
CatMouseView catMouseView = creatDynamic(); | ||
group.addView(catMouseView); | ||
catMouseView.startAnim(); | ||
}); | ||
} | ||
|
||
private CatMouseView creatDynamic() { | ||
CatMouseView catMouseView = new CatMouseView(this); | ||
catMouseView.setBgFilletRadius(30); | ||
catMouseView.setAnimDuration(3000); | ||
catMouseView.setBgColor(Color.MAGENTA); | ||
catMouseView.setIsShowGraduallyText(true); | ||
return catMouseView; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<resources> | ||
<string name="app_name">CatLoadingView</string> | ||
<string name="app_name">CatMousegView</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.heyongrui.catloadingview.library" /> | ||
package="com.heyongrui.catmouseview.library" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../catloadingview/library/DrawableUtil.java → ...ui/catmouseview/library/DrawableUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ui/catloadingview/library/EyelidView.java → ...grui/catmouseview/library/EyelidView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...oadingview/library/GraduallyTextView.java → ...tmouseview/library/GraduallyTextView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters