-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
8290a86
commit 65c4b0c
Showing
26 changed files
with
233 additions
and
1,234 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
Binary file not shown.
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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.lizongying.mytv | ||
|
||
import android.view.View | ||
import androidx.core.content.ContextCompat | ||
import androidx.leanback.app.ErrorSupportFragment | ||
|
||
class ErrorFragment : ErrorSupportFragment() { | ||
|
||
internal fun setErrorContent(message: String) { | ||
imageDrawable = | ||
ContextCompat.getDrawable(context!!, androidx.leanback.R.drawable.lb_ic_sad_cloud) | ||
this.message = message | ||
setDefaultBackground(TRANSLUCENT) | ||
backgroundDrawable = ContextCompat.getDrawable( | ||
context!!, | ||
R.color.black | ||
) | ||
|
||
buttonText = resources.getString(R.string.dismiss_error) | ||
buttonClickListener = View.OnClickListener { | ||
fragmentManager!!.beginTransaction().remove(this@ErrorFragment).commit() | ||
} | ||
} | ||
|
||
companion object { | ||
private const val TRANSLUCENT = false | ||
} | ||
} |
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
Oops, something went wrong.