Usually in landscape mode an EditText will open the IME in full screen mode, but for an textfield inside a webview (loaded as a HTML content) it doesn't and it pushes the existing view upwards. Tried using 'adjustpan' options but to no avail. Is it possible to change the IME in this scenario? Thanks in advance...
'adjustPan' might not work unless you specify the option for all of the views in the tree, not just the activity. Take a look at this answer for more info: https://stackoverflow.com/a/7183626/758458
Related
I am new to android development. The mouse pointer on the design page is as shown in the screenshot. I am not able to edit anything like increasing the height and width of the widget on this page. I might be able to do it in XML but I want it done here.
I want a normal mouse pointer where I can edit the widgets.
I tried looking at some of the blogs but it didn't help.
activity.xml - design
It worked after removing the cache files and restarting the android studio
How can I switch between the tabs of a TabHost in the UI Designer for inserting content? Is there a keyboard shortcut or something else
I found a way to visualise any tab using TabHost in the UI Designer. Is probably not the best way, but it works.
1. Go to the Component Tree, where you have all the elements of the UI.
2. Inside the FrameLayout that TabHost automatically creates for you, there are the tabs.
3. If you change the order of the tabs just drag and dropping in the Component Tree, you get to see the one that is placed in the first position.
UPDATE:
According to this answer there is no way to change the tabs of a TabHost. That question refers to IntelliJ; I don't know if it applies to Android Studio.
Also, it seems that TabHost has been replaced by FragmentActivity and ActionBar. See Android how can i replace the deprecated tabhost? for a discussion.
It is defined as "Select next Tab in multi-editor file" in Settings -> Keymap.
On Windows it seems to default to CRTL+SHIFT+RIGHT/LEFT or ALT+SHIFT+RIGHT/LEFT. On my Mac it defaults to CTRL+SHIFT+RIGHT/LEFT.
Note that Studio doesn't allow the default Keymap to be edited so you will first need to copy the default and give it a new name.
Also see Shortcut to switch between design and text in android studio.
By mouse, select the FrameLayout then long left click on any space in it.
I am new to Xamarin IOS and I have a problem with creating nested layouts in IOS as like in Android(some text controls and a list view) . I added a tableview but not sure how to add some text and image controls in a view and add the tableview below the text and image controls. Also I am using ViewPager in Android and is there an equivalent control that I can use in IOS?
Yes, you should use UIScrollView and enable paggin there. The only issue that you need always to set the ContentSize for it, to make it scroll properly. So you should set the common Size of inner content.
You should check out monotouch.dialog for rapid tableview development. Once you get the hang of it, it makes creating tables a lot easier.
Android 4.0 phones only have virtual buttons, which actually go invisible when playing youtube/video at fullscreen (the video portion takes over where the buttons are).
I want to do this, but haven't found a way.
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
or
requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
do not cover the virtual buttons.
Here is an example that shows the type of full screen I'm talking about:
http://www.youtube.com/watch?v=Lw_O1JpmPns
Okay, I added this SYSTEM_UI_FLAG_HIDE_NAVIGATION flag to my video activity and that hid the virtual buttons.
WebView view = new WebView(this);
view.setSystemUiVisibility(WebView.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
Another choice is to use the SYSTEM_UI_FLAG_LOW_PROFILE flag. This doesn't hide the buttons though. Instead it makes the buttons go to "Low Profile" mode (basically turns them into little dots)
This works on my device but not in the emulator. Add this tho your activity in AndroidManifest.xml:
<activity ...
android:theme="#android:style/Theme.DeviceDefault.NoActionBar.Fullscreen" >
Inside the onCreate() of your Activity, add this:
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
this.getWindow().getDecorView()
.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
Worked well for me (but is not Honeycomb-compatible).
To make the buttons completely invisible, you should do
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
this.getWindow().getDecorView()
.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_IMMERSIVE);
The buttons would not use any space on the screen, unless you swipe up from the bottom of the screen. Notice that you need to target at SDK version 19 for this to work.
I have attached a toolbar with a UITextField and UIButton to the keyboard when it becomes the first responder via the user taping inside the textfield
textField.inputAccessoryView = theToolbar;
Problem is, the toolbar disappears when the keyboard is dismissed, thus preventing any further input.
Any ideas on how to make the toolbar go back to the bottom of the screen rather than off it completely?
I'm thinking a delegate method might help but Im really not too sure. It seems once the inputAccessoryView always the inputAccessoryView :(
Cheers
The input accessory view is automatically dismissed with the input view (the keyboard, in this case). Generally you do not want to have an input accessory view in your view hierarchy. Instead, if you want your toolbar to scroll up when the keyboard is shown, you should follow the guidelines for Managing the Keyboard.
You could try using an additional toolbar that is offscreen as the inputAccessoryView, which could "fake" the appearance of what you are trying to do. Alternatively, have you tried adding the toolbar back to the bottom of the screen using
[self.view addSubview:theToolbar];
when the keyboard reaches the bottom of the screen? You can use keyboard notifications for this.