-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[์ ์ ์ ๋ณด ๋ณต์ ๋ก๋ฉ] ๋ก๊ทธ์ธ ์ ์ ์ ์ ๋ณด ๋ณต์ ๋ก๋ฉํ๋ฉด
- Loading branch information
Showing
8 changed files
with
145 additions
and
10 deletions.
There are no files selected for viewing
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
21 changes: 21 additions & 0 deletions
21
app/src/main/java/com/lateinit/rightweight/ui/dialog/LoadingDialog.kt
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,21 @@ | ||
package com.lateinit.rightweight.ui.dialog | ||
|
||
import android.app.Dialog | ||
import android.content.Context | ||
import android.graphics.Color | ||
import android.graphics.drawable.ColorDrawable | ||
import android.view.Window | ||
|
||
|
||
class LoadingDialogProvider { | ||
|
||
fun provideLoadingDialog(context: Context, loadingLayout: Int): Dialog { | ||
return Dialog(context).apply { | ||
requestWindowFeature(Window.FEATURE_NO_TITLE) | ||
setCanceledOnTouchOutside(false) | ||
setCancelable(false) | ||
window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT)) | ||
setContentView(loadingLayout) | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
app/src/main/java/com/lateinit/rightweight/ui/model/LoadingState.kt
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,9 @@ | ||
package com.lateinit.rightweight.ui.model | ||
|
||
enum class LoadingState { | ||
NONE, | ||
RESTORE, | ||
GET, | ||
BACKUP, | ||
FAIL, | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<ProgressBar | ||
android:id="@+id/progress_bar_loading" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
app:layout_constraintVertical_chainStyle="packed" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:layout_constraintLeft_toLeftOf="parent" | ||
app:layout_constraintRight_toRightOf="parent" | ||
app:layout_constraintBottom_toTopOf="@+id/text_vitw_loading"/> | ||
|
||
<TextView | ||
android:id="@+id/text_vitw_loading" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
style="@style/Text.Medium.Bold" | ||
android:textColor="@color/white" | ||
android:layout_marginTop="8dp" | ||
app:layout_constraintTop_toBottomOf="@id/progress_bar_loading" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" /> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> |
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