Keyboard adjusting issue in react native for android - android

I'm a beginner to react native development and for keyboard handling in my current application, I have used react-native-keyboard-manager which works well in iOS. Now for android, it says I need to set android:windowSoftInputMode to adjustResize. I've tried both adjustResize and adjustPan as well but they both behave the same way and my view get squashed up. Below are the screenshots of my view.
View before keyboard appearance
View after keyboard appearance
Am I missing something here? Is there an easy way to fix this? I'm aware of other Libraries like KeyboardAvoidingView, KeyboardSpacer and KeyboardAwareScrollView, but if I use that I would need to implement it in every view and repeat same code to do it separately for android as in iOS it already works very well. Any help is appreciated

If you make changes to native code in your project then you must rebuild your project.
You will not see the updates in your simulator/emulator if you just reload it (ie pressing CMD+R or RR. This is due to the fact that when you reload all you are doing is changing the JavaScript and not the native code.
To effect the changes (usually the best way is to remove the previous build folder first) is to run react-native run-ios or react-native run-android that way you force a rebuild and any changes to your native code are then updated on your simulator/emulator.

Related

How can I see all my code without scrolling in Android Studio? (I mean all code in one page without scrolling)

You know scrolling in code is very annoying
is there any solution to get rid of it?
I mean I want to preview my code ALL in one page without any scrolling.
You can go to settings and set font to the least one.
go to android studio settings -> plugins; and search for codeGlance . install plugin and restart your ide. and voila.

React-Native app not updating in android device (Windows 10)

I´ve been trying to build my first app with react native but when I change the App.js the changes are not reflected when I run the app on my anroid device.
I even tried putting in comments all code to see if something changes but remains the same.
I´m using react-native-cli: 2.0.1 and react-native: 0.53.3
Sorry if writing wrong but English is not my "native" language :V
My code:
App.js
index.js
Hope you can help me, but I will keep trying.
I realized that when the app is running in a virtual device, the changes are reflected.
For real device, shake your phone to open the debug panel.
Make sure the Enable hot reloading option is switched on.
https://facebook.github.io/react-native/docs/debugging.html
This is not the main problem, but it's better to have a <View></View> component to wrap the Text component. So you can add more component and apply styling later on.

Android Webview caret disappears

I am in the process of testing a hybrid app for Android 4.4+. The app consists of
one custom plugin (my own effort)
the HTML UI created using Phonon.
Phonegap CLI v 6.4.2
My test device is a Huwaei Holly running Android 4.4.2
One of the issues I have run into is the fact that the caret in textarea and input controls stops working "after a while" and the soft keyboard does not popup when I tap the control.
By dint of some trial and error I pinned down the problem - it happens AFTER the app has displayed at least one vanilla HTML/JS alert box which I am using for my own debugging needs. Replacing that with a Phonon.alert box - which is simply an overlayed layer of HTML, not a new window as, I imagine, the bog standard alert is - "fixed" the problem.
Very good but the fact that this happens at all still bothers me - I will not use vanilla alerts in my release build but if it happened with alerts it might well happen with something else.
A spot of Googling revealed that is a known issue that appears to have been around for a while. This SO thread, for instance, suggests the Webview has to be set as being focussable and I have run into the same suggestion elsewhere too.
However, it is not at all clear to me just where I should do this. About the only configuration locations I have at my disposal are
The config.xml file for my Phonegap/Cordova project
The plugin.xml file for my custom Phonegap/Cordova plugin
The Phonegap docs related to config.xml do not mention anything about FrameworkLayout, android:focussable etc.
I'd be most grateful to anyone who might be able to either
explain just where the android:focussable bit should go or
suggest the root cause of the problem.

android:windowSoftInputMode="adjustNothing" equivalent in livecode

Do you know the equivalent of eclipse code android:windowSoftInputMode="adjustNothing" in livecode? This prevents changing the layout when the keyboard shows up.
Note: I created a web apps (html5 packed as android and ios apps)
Thanks.
The default behavior is not to change the layout, so you don't need to script it.

Custom Android Widget and Eclipse Intellisense

I am in the process of putting together a little Android app. I have created a couple of widgets by extending the ImageView and ScrollView widgets. The problem that I am having is not with the code itself (i.e. everything runs wonderfully) but rather with the Eclipse "intellisense" in an XML layout. If I am using the native android widgets, I get the normal eclipse suggestions and all is well. However, as soon as I add a reference to my widget (i.e. ) I lose intellisense on my widget AND (more painfully) on all widgets below my widget. In other words, I don't get intellisense on a if it exists below my widget. Again....everything runs, there is no error anywhere, it just becomes insanely slow to program this way.
This is very frustrating as I don't remember all the attributes of the various controls.
Has anyone encountered this or have any suggestions on where to begin trying to solve this? I don't even know what the correct term in Eclipse to start looking at this. After 3 days looking off and on, I am at my wits end.
Thanks in advance for any suggestions!
Try the new ADT 9.0.0 plugin. It has many improvements of the "visual editor". See the changelog here

Categories

Resources