-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
iOrchid
committed
Mar 20, 2024
1 parent
5016b43
commit f82255f
Showing
5 changed files
with
51 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,4 +30,5 @@ | |
</style> | ||
|
||
<style name="Theme.Jetpack" parent="AppTheme" /> | ||
|
||
</resources> |
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
17 changes: 17 additions & 0 deletions
17
jetpack/jetpack/src/main/java/org/zhiwei/jetpack/components/JetpackActivity.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 |
---|---|---|
@@ -1,15 +1,32 @@ | ||
package org.zhiwei.jetpack.components | ||
|
||
import android.app.Activity | ||
import android.content.Intent | ||
import android.os.Bundle | ||
import android.widget.Button | ||
import org.zhiwei.jetpack.databinding.DataBindingActivity | ||
import org.zhiwei.jetpack.work.WorkActivity | ||
|
||
/** | ||
* jetpack相关演示代码的功能模块的主入口页面 | ||
*/ | ||
class JetpackActivity : Activity() { | ||
|
||
private val btnDataBinding: Button by lazy { findViewById(R.id.btn_databinding_jetpack) } | ||
private val btnWorkManager: Button by lazy { findViewById(R.id.btn_work_jetpack) } | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
//此界面在AndroidManifest中使用了theme,状态栏和导航栏的透明 | ||
setContentView(R.layout.activity_jetpack) | ||
btnDataBinding.setOnClickListener { | ||
startActivity( | ||
Intent( | ||
this, | ||
DataBindingActivity::class.java | ||
) | ||
) | ||
} | ||
btnWorkManager.setOnClickListener { startActivity(Intent(this, WorkActivity::class.java)) } | ||
} | ||
} |
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