Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Eclipse
- table
- window
- react
- 정렬
- mybatis
- Python
- R
- 보조정렬
- NPM
- hadoop
- 공정능력
- xPlatform
- maVen
- es6
- Android
- Kotlin
- Java
- Sqoop
- IntelliJ
- mapreduce
- vaadin
- Spring
- MSSQL
- SPC
- Express
- tomcat
- SQL
- GIT
- JavaScript
Archives
- Today
- Total
DBILITY
독거 가능성 100% 노후에 라면값이라도 하게 센스를 발휘합시다!😅
Please click on the ad so that I can pay for ramen in my old age!
点击一下广告,让老后吃个泡面钱吧!
老後にラーメン代だけでもするように広告を一回クリックしてください。
android include viewBinding 본문
반응형
보통하는 Activity에서 하는 것처럼 필요한 Activity에서 하면 된다.
toolbar Layout을 만들고 그걸 Activity에서 include
class MainActivity : AppCompatActivity() {
private val binding by lazy {
ActivityMainBinding.inflate(layoutInflater)
}
private val bindingToolbar by lazy {
ToolbarLayoutBinding.inflate(layoutInflater)
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
//enableEdgeToEdge()
setContentView(binding.root)
/*ViewCompat.setOnApplyWindowInsetsListener(binding.drawerLayout) { v, insets ->
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
insets
}*/
setSupportActionBar(bindingToolbar.toolbar)
}
}
반응형
'android' 카테고리의 다른 글
Didn't find class "androidx.core.app.CoreComponentFactory" (0) | 2024.04.16 |
---|---|
AVD network speed (0) | 2024.04.15 |
android dark mode 비활성화 (0) | 2024.04.04 |
android external library register (0) | 2024.04.02 |
android retrofit2 (0) | 2024.04.01 |
Comments