-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
fd77607
commit 03921b6
Showing
5 changed files
with
42 additions
and
24 deletions.
There are no files selected for viewing
18 changes: 0 additions & 18 deletions
18
app/src/main/java/com/huantansheng/jandroid/sample/net/LoadingDialog.kt
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
app/src/main/java/com/huantansheng/jandroid/sample/net/NetLoadingDialog.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,23 @@ | ||
package com.huantansheng.jandroid.sample.net | ||
|
||
|
||
import com.huantansheng.jandroid.base.BaseApplication | ||
import com.huantansheng.jandroid.dialog.SimpleLoadingDialog | ||
|
||
|
||
object NetLoadingDialog { | ||
private var dialog: SimpleLoadingDialog? = null | ||
|
||
|
||
fun show() { | ||
if (dialog == null) | ||
dialog = SimpleLoadingDialog(BaseApplication.instance.applicationContext) | ||
|
||
dialog?.show() | ||
|
||
} | ||
|
||
fun cancel() { | ||
dialog?.dismiss() | ||
} | ||
} |
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
14 changes: 14 additions & 0 deletions
14
jandroid/src/main/java/com/huantansheng/jandroid/dialog/SimpleLoadingDialog.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,14 @@ | ||
package com.huantansheng.jandroid.dialog | ||
|
||
import android.app.Dialog | ||
import android.content.Context | ||
import com.huantansheng.jandroid.R | ||
|
||
class SimpleLoadingDialog(context: Context) : Dialog(context) { | ||
|
||
init { | ||
this.setContentView(R.layout.j_dialog_loading) | ||
} | ||
|
||
|
||
} |