Last active
February 24, 2019 11:20
-
-
Save daichan4649/5344979 to your computer and use it in GitHub Desktop.
Full screen ProgressDialog (for Android)
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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:gravity="center" | |
android:orientation="vertical" > | |
<ProgressBar | |
android:id="@+id/progressBar" | |
style="?android:attr/progressBarStyleLarge" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" /> | |
</LinearLayout> |
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
class ProgressDialogFragment extends DialogFragment { | |
public static ProgressDialogFragment newInstance() { | |
return new ProgressDialogFragment(); | |
} | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setStyle(STYLE_NO_FRAME, android.R.style.Theme_Translucent); | |
} | |
@Override | |
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |
return inflater.inflate(R.layout.fragment_dialog_progress, container, false); | |
} | |
} |
any usage example in activity?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
処理中ダイアログ