How do I make sure that the Android keyboard does not compress the content? - react-native

enter image description here
On iOS, everything works, the block is not pressed to the top. I can't solve the problem on android

By default android native code maintains the soft input with the keyboard.
You have to do some changes to solve your problem.
open your android manifest file you can see the line in the application tag below
android:windowSoftInputMode="adjustResize"
replace it with the below line:
android:windowSoftInputMode="adjustNothing"

Related

The android emulator does't show the changes that occur in the code

I am knew in react native and I need to run a project. I used the following command in the folder of my project:
1- npm start
2- react-native run-android
However, I have a strange problem. Whenever I change any thing in the code, nothing happen in emulator and the emulator show me the previous thing!
I have done it with cell phone connected to the PC and see the same result!
I even stop the emulator and start it again but, I see the same problem. The emulator do not show any changes in the code and show a constant project. Can you help me?
Update:
As I shake the cell phone and reload it, I see the following red screen error:
Could not connect to development server.
You need to enable either Live Reload or Hot Reloading. Within the simulator, you can access the menu with the Cmd+M combination or click the icon (see screenshot) then just choose the option you want.

change image in push notification popup

I have developed the push notification functionality in my MobileFirst 7.1 app. Push notifications are working fine and I am able to receive them in my application. I want to change the image in the notification popup which is coming default as worklight image. See below screenshot. How can I do it?
In your Android project's "res/drawable*" folders ,you should find "push.png" file that shows this icon. If you change it to your own icon, make sure you maintain the same name.
Realizing that you have already accepted an answer, I'll leave this here just in case someone else has the same problem.
I found that I had to run cordova clean before my build in order for the images to get copied into the .apk properly by the build process.

How to temporarily disable rage shake opening the dev menu in react-native?

I'm developing an app in react-native for Android. I recently added a barcode scanning component. Whenever the scanner reads a barcode, the camera does a subtle click noise. It seems that this clicking is enough to trigger the "shake" required to open the developer menu.
Is there any way I can disable this shortcut programmatically? I would like to disable the shortcut when the barcode scanner is running and then enable it again later.
This is currently not possible. A PR allowing this was recently (may/2017) merged, but only adds support for this on ios: https://github.com/facebook/react-native/pull/13563
You can't. You could try disabling the camera shutter sound though.
Try to run release version of an app. Run react-native run-android --variant=release for more details to generate signed apk follow guide here
You can put the phone on silent mode, hope this helps!

App icon is not displayed on the simulator screen

I draged all kinds of icons. After that I can see them in small windows in "General - App Icons" but when I run a simulator and go to Home Screen, my app icon is not displayed. What is wrong?
Click "Clean" in Xcode. Then remove app from simulator. Then run app.
restart your simulator. Make sure you have proper icon for device type / resolution you are trying to simulate.
For XCode 8 I had this same problem. I had created multiple targets and in doing so had unknowingly removed all targets from membership of Assets.xcassets.
To fix it for me, I selected Assets.xcassets in the project view and then reselected all the targets that I wanted to apply my icon sets to.

How to make built app with icon?

I'm writing an OSX App and added an icon for it.
After building in Xcode, I can see the app with icon under Products folder, but when I RightClick->'Show in Finder', the built file is shown without icon. I want the built file to have an icon.
For Mac OS applications, you need to create an .icns file and include it in your Info.plist just like any other project.
Just change icon.png to icon.icns
When I submit an icon image for my app, I never add the .icns extension. It is automatically assumed by the compiler. So for the icon file "icon.icns", simply enter "icon".