-
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.
- Loading branch information
1 parent
b96711e
commit c273ff3
Showing
5 changed files
with
114 additions
and
24 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.hyc.parrot | ||
|
||
import android.os.Bundle | ||
import com.hyc.parrot_lib.InitCache | ||
import kotlinx.android.synthetic.main.activity_four.tv_user | ||
|
||
/** | ||
* @author: 贺宇成 | ||
* @date: 2019-12-23 10:04 | ||
* @desc: | ||
*/ | ||
class FourActivity : BaseActivity() { | ||
|
||
@InitCache("curUser", onlyRead = true) | ||
private lateinit var curUser: UserBean | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_four) | ||
tv_user.text = curUser.toString() | ||
curUser = UserBean("李四", "123", 0, 0.0f) | ||
} | ||
|
||
} |
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,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="horizontal" android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
|
||
<TextView | ||
android:id="@+id/tv_user" | ||
android:layout_gravity="center" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content"/> | ||
|
||
</FrameLayout> |
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