Comments (7)
Hi!
The library should be working fine on top of Compose apps, I know about full Compose projects that use it without issues.
There is no difference in setup whatsoever: you just have to initialize it in your custom Application class.
Do let me know if you encounter any issues as right now I'm not aware of any Compose related problems.
from beagle.
Hello again:
Yes, I do have an issue on Compose.
My implementation works when testing in regular views, but not in Compose -- for any UI type.
compileSdk 32
minSdk 23
targetSdk 32
beagleVersion = "2.6.6"
beagleUiType = "ui-drawer"
debugImplementation "com.github.pandulapeter.beagle:$beagleUiType:$beagleVersion"
override fun onCreate() {
super.onCreate()
Beagle.initialize(this)
Beagle.set(
HeaderModule(
title = getString(R.string.app_name),
subtitle = BuildConfig.APPLICATION_ID,
text = BuildConfig.VERSION_NAME
),
PaddingModule(),
TextModule("Rendering", TextModule.Type.SECTION_HEADER),
KeylineOverlaySwitchModule(),
AnimationDurationSwitchModule(),
ScreenCaptureToolboxModule(),
DividerModule(),
ForceCrashButtonModule()
)
}
from beagle.
@RyeGordo That's weird...
Check out this small project here.
It's basically a blank canvas with Jetpack Compase + Beagle. This last commit added the debug menu, it's working fine on my devices. Maybe check it out but I suspect the problem lies somwhere else.
What exactly is the problem you see? The debug menu simply doesn't appear...? Are you sure that the custom Application class is registered in the Manifest? I can't think of any other issues right now.
from beagle.
The problem I have is the Debug Drawer not appearing. This is with swipe gesture or device shake.
My Application class is registered in the manifest.
I made an attempt to re-implement with an Empty Compose project from Android Studio which still does not work.
The sample project you provided works. Aside from "dependency catalogs" and "kotlin DSL", I am trying to pick through the differences. I looked at pretty much everything from Themes to the gradle dependencies.
I am unable to figure out what I'm doing wrong despite synchronizing the differences in both directions.
from beagle.
I think I found the issue!
Bealge only injects itself into Activities that extend the FragmentActivity
(AppCompatActivity
is one such example).
If you create an "Empty Compose Activity", that's only going to extend ComponentActivity
(which is one of the parent classes of FragmentActivity
).
To fix your issue, simply make your Activity extend AppCompatActivity
. Let me know if this works!
Sorry, I should have caught this earlier.
from beagle.
Yes, it looks like AppCompatActivity
was the missing part in all of this.
I have Beagle finally working.
And no worries about missing this. This is something I should have also suspected given that Beagle is still driven by Fragments/Activities.
Thanks, for your help.
from beagle.
Glad we figured it out. You're right, Beagle uses an overlay Fragment to do its thing, so it needs the supportFragmentManager
getter from FragmentActivity
. I'll update the readme to highlight this fact.
from beagle.
Related Issues (20)
- TextInputModule Crash HOT 2
- On SDK 31 and above the screen recording crashes when started HOT 1
- Beagle crash logging doesn't work HOT 2
- Crash with DrawerLayout when getting permissions HOT 3
- Drawer doesn't appear when using content.viewTreeObserver.addOnPreDrawListener on the Acitivty HOT 5
- Beagle should not cause a crash if a value is set to the Slider module that is outside the specified range HOT 1
- The drawer opening gesture does not respect the value of `shouldShowDebugMenu` HOT 1
- Can't open Activity when try to forceCrash from debug panel HOT 7
- ListModules should support the isEnabled flag.
- TextInputModule. Suggestion for improving the validator
- Buggy inset handling in edge-to-edge apps
- SwitchModule. Ui data not re-initialize. Reset selected state HOT 5
- Double debug-panel HOT 3
- When activity theme is not a material theme, Beagle view crashes. HOT 6
- Implement dynamic notification permission support HOT 1
- Android 14 and gesture to preview back HOT 2
- Incorrect permissions for creating a screen recording / screenshot HOT 1
- After granting the notificaiton permission, the app needs to be restarted for screenshots / screen recordings to work HOT 1
- Screen recording issues on foldables
- Beagle causes the application class to crash when opening the app from a push notification HOT 1
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 beagle.