Last active
October 11, 2017 14:55
-
-
Save jie-meng/0742c44dbd6bedec1d1caa11dc7eede7 to your computer and use it in GitHub Desktop.
createProgressView
This file contains hidden or 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
public static View createProgressView(Activity activity) { | |
ViewGroup viewGroup = (ViewGroup) activity.findViewById(android.R.id.content); | |
View progressView = LayoutInflater.from(activity).inflate(R.layout.view_progress_bar, viewGroup, false); | |
viewGroup.addView(progressView); | |
return progressView; | |
} |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:clickable="true"> | |
<ProgressBar | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_gravity="center"/> | |
</FrameLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment