Comments (8)
Add this to your fragment's onCreateActivity:
(activity as AppCompatActivity).supportActionBar?.hide()
from andfun-kotlin-android-trivia.
Thank you! I'll close the issue now.
from andfun-kotlin-android-trivia.
how to hide bottom action bar when new fragment opens?
from andfun-kotlin-android-trivia.
Add this to your fragment's onCreateActivity:
(activity as AppCompatActivity).supportActionBar?.hide()
I use it now, and works thank you very much
from andfun-kotlin-android-trivia.
Thanks to @jheske , I think there should be a better way to do this while there are many fragments and A Main Activity and that toolbar should be there . using a interface . I don't know exactly how it can be used when we have inner fragment, I mean when they are opened up and "replace" each other.
from andfun-kotlin-android-trivia.
sorry,in my case with two fragments hide action bar,help me
from andfun-kotlin-android-trivia.
(activity as AppCompatActivity?)!!.getSupportActionBar()!!.hide()
from andfun-kotlin-android-trivia.
(activity as AppCompatActivity?)!!.getSupportActionBar()!!.hide()
where is the onCreateActivity method in fragments? I am not able to implement??
from andfun-kotlin-android-trivia.
Related Issues (20)
- GameWonFragment compiler error when implementing SafeArgs HOT 20
- Fails to build in Android Studio 3.4, citing Gradle errors or IDE fatal error HOT 2
- E/ViewRootImpl: sendUserActionEvent() mView == null HOT 3
- AndroidX implementation HOT 4
- Navigation drawer not closing HOT 5
- Can't use safe args HOT 2
- Can't add "layout_gravity" property to NavigationView in DrawerLayout HOT 5
- Can't build the project as license for sdk is not accepted
- Gradle sync failure. Could not find androidx.navigation:navigation-safe-args-gradle-plugin:1.0.0-alpha07. HOT 2
- GameWonFragment compiler error when passing fragment in ShareCompat.IntentBuilder.from() HOT 6
- Step.09-Solution not working HOT 2
- Redundant code in GameFragment.kt (Branch: Step.03-Exercise-Conditional-Navigation)
- Gradle sync failure. Failure to resolve - android.arch.navigation:navigation-fragment-ktx:2.3.0, - android.arch.navigation:navigation-ui-ktx:2.3.0 HOT 3
- Unsolved referense
- deprecated way for options Menu HOT 1
- The app doesn't complie once used because the old navigation Libaries and need to update target SDK HOT 7
- Adding the Up-Button causes app crashing
- Incompatible Kotlin/Gradle Version on Branch Step.01-Exercise-Creating-and-Adding-a-Fragment HOT 4
- Method onSupportNavigateUp: Sequence of method arguments interchanged HOT 4
- ActivityMainBinding and FragmentTitleBinding unresolved reference HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from andfun-kotlin-android-trivia.