How can I move from one fragment to another fragment on button click? (kotlin) - kotlin

I’m trying to move from one fragment to another fragment on button click and I have watched tutorials on YouTube using ViewBinding to perform this action. But each time I try, it just doesn’t seem to work. I have added the “build features{
ViewBinding true “ in my Gradle (module:app) file and each time I run my app, my app crashes with the error “unknown host: ‘dl.google.com’”
PS: findViewById doesn’t work in fragments
I have spent weeks trying to figure this out. Can someone pls help me out?
Thanks in Advance

Moving from one fragment to another can be easily achieved using Navigation component.
I would suggest taking a look at this link as a starting point:
https://developer.android.com/guide/navigation/navigation-getting-started

Related

Init with push vue router, back button not working

The problem seems easier but not working, im working over a spa on webview for apps.
So for example, in some cases I start the web with a main route, like 'localhost/path1/path2'.
So if they press a custom button in topbar (custom component), it goes to 'localhost/path1', here perfect.
The problem is when they press the native back button, or the back arrow in desktop (native).
What happen here is the app is closed or the url is empty in desktop.
I tried to force a push in many ways on load vue with many paths, but not working, I tried to intercept native back and force push to avoid close first time with many paths, but not working anyways.
If someone understand what Im saying and a solve for urls with path/id, and after native back just keep path, instead of close I hope you can help.
Thanks

react-native-router-flux - Resetting navigation stack in tab

What we want
We use react-native-router-flux in our application and find ourself in a situation where we need to reset the navigation stack (at least) for one tab. This is our scene structure:
tabs
listTab
listView
recordingView
creationTab
recordView
descriptionView
publishView
Concretely, our application lets users create and view recordings. There's a listTab, with two sub-scenes (list of recordings and view a single recording) and a tab for creating (creationTab) recordings with several steps (recordView, descriptionView, publishView). After the last step, the recording is published and we redirect to the viewRecording scene for that recording in the listTab.
When pressing the creationTab again, we would like to get back to the first scene of the creation process again, but instead we of course land on the last step (publishView) again.
What we tried
After reading through the documentation and issues connected to this, we figured the option reset might help us. However, if we try to add type='reset' to the props of creationTab, when pressing the tab, all other tab icons disappear (as documented in this issue).
So instead, we then tried to set the type of our push from publishView to recordingView to reset, but that also did not work (although the right action is dispatched and the back button is removed on the new scene, when hitting the recordingTab icon again, we still get back to our old publishView).
We also though about using Switches, to unmount the components but it doesn't seem like this is how they were intended to be used...
Versions
react-native: 0.30.0
react-native-router-flux: 3.32.0
We're now getting a bit desperate after days spent on issues like this and similar ones and I am not sure how we should proceed. Has anybody experienced similar problems or found a solution?
I faced the same issue. As a temporary workaround, I do not use the reset option but instead follow the redirection immediately with a pop action.
In my case, my view is only one level deep so this is not too dirty. I'll look for a cleaner solution but I hope it can help in the meantime.
react-native: 0.35.0-rc
react-native-router-flux: 3.35.0

how to navigate to settings in android emulator using robotium?

I am a newbie for Robotium and till then I managed to learn a lot by directly writing test cases for public websites and sorted out several issues from answers in stackoverflow. now, I seemed to hit the wall at this (probably)trivial problem.
I would like to navigate to 'Settings' icon which is inside 'Apps' menu of the android emulator using some sort of 'robotium-solo' method.
This is my failed attempt:
solo.sendKey(KeyEvent.KEYCODE_HOME);
//solo.clickOnImageButton(2); // no success!
//solo.clickOnActionBarItem(2); // no success!
solo.clickOnText("Settings");
solo.clickOnText("Music");
I checked for any KEYCODE_var for home screen 'app' icon but couldn't find one.
There is no useful log message in DDMS to figure out the starting activity when clicked/tapped on that button.s
Please guide me whether my approach is any good and help me with an answer. Thanks.
you can check with getCurrentViews() and have the list of views displayed before clicking the menu button and after clicking the menu button.By comparing them you can get the view of the new views displayed (i.e. settings button).
After getting the view,you can go with solo.clickOnView(ViewNameObtained);
This will solve your problem for sure.
As far as I know, navigating to settings is not possible with robotium. Even if you would be able to go there you cannot perform any other action as Settings are not port of your application. Android Instrumentation allows performing actions only within one package and robotium is only wrapper for that, so it's not able to click outside your application as well.
You can use UI Automator for that.

How to use xcode's Fix and Continue debugging feature?

I have not find any tutorial about using xcode's "Fix and Continue feature". If someone knows how to use this please let me know. I would like to use this feature in iOs Apps. Does some knows a way to use this. Whenever I use this I got error "classname.m dylib" not found.
Here is a screen-shot when using fix and continue feature for iPhone apps.
Second result from just typing 'xcode fix and continue' into the search field on google gives http://thurly.net/14ty
This shows (albeit following a long previous tutorial) how fix and continue works.

Accordion Menu in XCODE

hey, I'm trying to make a accordion menu in Objective-C for a iPad app. The only thing I know is that I should look over core animation.
Couldn't find anything helpfull.
Can anyone help me ? at least give me a few pointers.
i am also trying to implement Accordion Menu for iPad.. i have been doing some research and found that this link is a good help...
http://www.deepinthecouch.com/iphone-sdk/accordion-uitableviews-programming-backwards
(Go here for the archived version)
i have tried putting in the codes in this blog to my project, but i kept getting some weird errors..
so instead, i am taking the concept and try to implement something myself...
if u get ur accordion menu work, do share it.. i will do the same... :)
[Update] : i have revisited the blog page again just now, and found that the author have added a new entry and added a piece of code that works...
Have a look
http://www.deepinthecouch.com/iphone-sdk/accordion-uitableviews