Ваши данные в Soboly надёжно защищены. Мы не отслеживаем вас.

Результаты для "android get activity from fragment"

Call an activity method from a fragment - android - Stack Overflow

https://stackoverflow.com/questions/12659747/ca...

30 сент. 2012 г. ... From fragment to activty: ((YourActivityClassName)getActivity()).yourPublicMethod();. From activity to fragment:

Communicate with fragments | App architecture - Android Developers

https://developer.android.com/guide/fragments/c...

10 февр. 2025 г. ... Both your fragment and its host activity can retrieve a shared instance of a ViewModel with activity scope by passing the activity into the ...

The proper way of getting the Activity or Fragment Manager from the ...

https://gist.github.com/9f3bb92f7000443bcb9c5ad...

* limitations under the License. */. import android.app.Activity;. import ... Activity activity = getActivity(context);. if (activity instanceof ...

Getting an Activity and a Fragment to Interact - DEV Community

https://dev.to/petemode/getting-an-activity-and...

7 сент. 2022 г. ... You get this reference to the fragment by calling the method findFragmentById() on the result of calling either getFragmentManager() or ...

Difference between getActivity and requireActivity - Medium

https://medium.com/@faisaldeveloper493/differen...

12 июн. 2022 г. ... but getActivity return null when that Fragment is not attached to the Activity. requireActivity() returned exception and its message ...

Fragment manager | App architecture - Android Developers

https://developer.android.com/guide/fragments/f...

10 февр. 2025 г. ... You can access the FragmentManager from an activity or from a fragment. FragmentActivity and its subclasses, such as AppCompatActivity , have ...

Using Context in a Fragment - Repeato

https://www.repeato.app/using-context-in-a-frag...

6 июн. 2024 г. ... Methods to Get Context in a Fragment · Using getActivity() · Using onAttach(Context context) · Using requireContext() · Using onCreateView Method.

Difference Between a Fragment and an Activity in Android

https://www.geeksforgeeks.org/android/differenc...

23 июл. 2025 г. ... Fragment is the part of the Activity, it is a sub-Activity inside activity which has its own Life Cycle which runs parallel to the Activities Life Cycle.

Урок 106. Android 3. Fragments. Взаимодействие с Activity

https://startandroid.ru/ru/uroki/vse-uroki-spis...

10 сент. 2012 г. ... package ru.startandroid.develop.p1061fragmentactivity; import android.app.Fragment ... Access to Fragment 2 from Activity"); }. Используем метод ...

How do I navigate activity to fragment in Android? - Quora

https://www.quora.com/How-do-I-navigate-activit...

28 мая 2015 г. ... Get a reference to the input that you're getting into the Fragment class. Don't forget to make it as public and dropping an instance into your ...

🖼️ Изображения

🎥 Видео

How to Open Activity from Fragment in Android - Navigation Drawer

YouTube • March 28, 2017 • 06:42

How to Open Activity from Fragment in Android - Navigation Drawer. You know that it is easy to create a navigation drawer from a set of template of Android Studio but then you would be surprised to encounter a lot of coding problem along the way. One of the problem is you don't know how to launch an activity from a fragment in Android. You will ...

How to Create Fragments in Android Studio (2023) | Fragment Activity

YouTube • October 31, 2023 • 11:40

How to Create Fragments in Android Studio (2023) | Fragment Activity #androidstudio #learnandroid #fragments

Fragment Lifecycle in Android - Android Studio Tutorial

YouTube • October 9, 2023 • 15:55

Let's get started with the Fragment Lifecycle in Android, Fragment lifecycle is an important topic of Android App Development so we'll provide you a complete guidance on the lifecycle of fragments in Android Studio. Whether you're a beginner or an experienced developer, You need to know how fragments actually work. . . 💰 Love what we do ...

Android Studio Navigation Drawer With Fragment and Activity || Custom Navigation Drawer

YouTube • June 12, 2021 • 10:33

Remember to subscribe if you are not subscribed. Subscribe link: https://www.youtube.com/c/larntech20?sub_confirmation=1 For additional help comment below: For personal assistance, you can reach me through: [email protected]

How to Pass Data from one Fragment to another in android || Android Studio Tutorial

YouTube • August 27, 2024 • 05:11

In this you will learn how to pass data from one fragment to another fragment using bundle class. Source code: https://github.com/Pritish-git/pass_fragment_data Thank you guys for watching and don't forget to subscribe https://www.youtube.com/c/technicalcoding check out my website:- https://technical-coding.blogspot.com Follow me on Intagram ...

Pass Data From Activity To Fragment Using Kotlin In Android Studio

YouTube • December 24, 2022 • 07:37

Pass Data From Activity To Fragment Using Kotlin In Android Studio. #pass_data_from_activity_to_fragment #fragment #kotlin

Sitemap

Время выполнения: 4.66 секунд

Контакт: [email protected]

Политика конфиденциальности
Kuzga