This repository has been archived by the owner on Aug 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 128
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
Showing
17 changed files
with
179 additions
and
39 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
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,4 @@ | ||
package com.dirror.music.data | ||
|
||
const val PLAYLIST_TAG_NORMAL = 0 | ||
const val PLAYLIST_TAG_MY_FAVORITE = 1 |
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
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
41 changes: 41 additions & 0 deletions
41
app/src/main/java/com/dirror/music/ui/dialog/AppInfoDialog.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,41 @@ | ||
package com.dirror.music.ui.dialog | ||
|
||
import android.annotation.SuppressLint | ||
import android.content.Context | ||
import android.os.Build | ||
import com.dirror.music.MyApplication | ||
import com.dirror.music.databinding.DialogTextInfoBinding | ||
import com.dirror.music.foyou.sentence.foyoulibrary.FoyouLibrary | ||
import com.dirror.music.room.AppDatabase | ||
import com.dirror.music.util.Secure | ||
import com.dirror.music.util.defaultTypeface | ||
import com.dirror.music.util.getVisionCode | ||
import com.dirror.music.util.getVisionName | ||
|
||
class AppInfoDialog(context: Context) : BaseBottomSheetDialog(context) { | ||
|
||
val binding = DialogTextInfoBinding.inflate(layoutInflater) | ||
|
||
init { | ||
setContentView(binding.root) | ||
} | ||
|
||
@SuppressLint("SetTextI18n") | ||
override fun initView() { | ||
super.initView() | ||
binding.apply { | ||
tvText.typeface = defaultTypeface(MyApplication.context) | ||
tvText.text = """ | ||
[app.ver ] ${getVisionName()} | ||
[app.build ] ${getVisionCode()} | ||
[is debug ] ${Secure.isDebug()} | ||
[foyou.ver ] ${FoyouLibrary.VERSION} | ||
[database.ver] ${AppDatabase.DATABASE_VERSION} | ||
[model ] ${Build.MODEL} | ||
[android.ver ] ${Build.VERSION.RELEASE} | ||
[android.sdk ] ${Build.VERSION.SDK_INT} | ||
""".trimIndent() | ||
} | ||
} | ||
|
||
} |
29 changes: 29 additions & 0 deletions
29
app/src/main/java/com/dirror/music/ui/dialog/BaseBottomSheetDialog.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,29 @@ | ||
package com.dirror.music.ui.dialog | ||
|
||
import android.content.Context | ||
import android.os.Bundle | ||
import android.view.Gravity | ||
import android.view.ViewGroup | ||
import com.dirror.music.R | ||
import com.google.android.material.bottomsheet.BottomSheetDialog | ||
|
||
abstract class BaseBottomSheetDialog(context: Context): BottomSheetDialog(context, R.style.style_default_dialog) { | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
window?.setGravity(Gravity.BOTTOM) | ||
window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT) | ||
window?.setWindowAnimations(R.style.dialog_animation) | ||
initView() | ||
initListener() | ||
} | ||
|
||
open fun initView() { | ||
|
||
} | ||
|
||
open fun initListener() { | ||
|
||
} | ||
|
||
} |
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
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.