일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 안드로이드스튜디오
- 밑줄
- OutlinedButton
- nav_graph
- 안드로이드 스튜디오
- firebase
- ButtonWithButton
- ViewModel
- RealtimeDB
- 팝업액티비티
- Kotlin
- button
- ArrayList
- MaterialButton
- Imageview
- ROOM
- Android
- textview
- firebasefunctions
- EditText
- Dialog
- 뷰바인딩
- lifecyclescope
- 랜덤ID
- 안드로이드
- Activity
- androidstudio
- 코틀린
- FRAGMENT
- BottomSheetDialog
- Today
- Total
목록뷰바인딩 (2)
안드로이드 앱 개발
먼저. fragment.kt 파일과 xml을 만들어준다. class FragmentCustomers : Fragment() { private var fragmentCustomersBinding:FragmentCustomersBinding? = null; override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ): View? { val binding = FragmentCustomersBinding.inflate(inflater, container, false) return binding.root } override fun onDestroyView() { fragmentCusto..
1. Java step1. 먼저 build.gradle(:app)에 buildFeatures { viewBinding = true } 위와 같은 속성을 추가해준다. step2. 액티비티 전역에 바인딩 변수를 선언해주고 ActivityMainBinding binding = null; onCreate에서 연결해주면 된다. @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); binding = ActivityMainBinding.inflate(getLayoutInflater()); setContentView(binding.getRoot()); } 2. Kotlin step1은 동일하다. ..