I have an app with a EditText in the bottom of the screen
when im writing into this editText the keyboard opens and covers half of the screen so i see only the bottom half of my screen(so far so good cause the editText is in this half)
now when i press the text the android text selection menu opens up in the top of the screen so
no i see only the top half of the screen and i cant see my EditText
can i change the selection tool or make it float or change the position of it?
Include these two lines in your edittext layout file.
android:freezesText="true"
android:gravity="top"
Related
Currently, when I select an EditText in my application and the keyboard appears, the layout/view automatically adjusts to show the full EditText just above the keyboard, if it would have been below, otherwise.
Is there any way to set a different View to be just above the keyboard when it shows up? I have a button just below the EditText and I would like to have it just above the keyboard, if possible.
put that button and EditText into a layout and make that layout gravity top, or in Button's attributes add this line
android:layout_below="id of edittext"
Hope these help.
When you activate an editText and your application is in landscape mode your view will change and all you see is a white screen and your textbox.
I have lots of text boxes the user has to fill with information.
Since the white area is stretched to the full width and height of your screen this can be very confusing. You don't know which textbox is now activated.
Thats why I want to add a textlabel to each portrait view of the editText box.
How could this be done?
Edit:
android:imeOptions="flagNoExtractUi"
is not a solution because the softkeyboard hides some editText boxes.
I have developed an iPhone app and now going to port it to Android. Almost all features work but the only thing I noticed is when I focus any Texbox or Textarea, the keyboard is opened and moves the whole page off the screen. I got to know that putting android:windowSoftInputMode="adjustPan" would solve the issue but then another issue came out.
Now when I focus any text element, the keyboard is opened but the view size is squeezed to the height (minus keyboard height) shifting bottom tab buttons above keyboard which is very bad effect in my opinion. Although it doesn't now move the whole page off the screen but can I use this property android:windowSoftInputMode="..." to ask it to show keyboard over tab buttons (hiding tab buttons under keyboard) but just move the view if the text elements are being hidden?
whenever I click on the EditText, the screen readjusts and the edittext-view moves up. But this is not enough and the soft-keyboard still covers the view to not show what a user typing.
My layout is as follows:
A listview occupying 65% of screen height, followed by an editetxt view and a button
LISTVIEW
______________________________
EDITTEXT |BUTTON
______________________________
My activity has the following flag set android:windowSoftInputMode="stateAlwaysHidden|adjustPan"
adjustPan forces the soft keyboard to appear on top of your layout, blocking anything at the bottom. You're going to want to use adjust resize instead, which will move up your EditText and Button, and shrink the ListView. If, in landscape mode, the ListView is shrunk to the point of being unusable/pointless, consider using a fullscreen IME keyboard.
Read about something like that just recently. Is this what you are looking for?
http://www.vogella.de/blog/2010/10/25/android-windowsoftinputmode/
I want to use/create a button that works like the one on the (HTC Desire) Soft Keyboard.
So that when you make a long click, it will show a list of options, and by sliding your finger to the left or right, you select which option you want to choose.
Example: When I hold down the "12#" button on the keyboard, it presents the
list: [: / # _ - ! ? '], and by sliding left or right it highlights one of these characters and chooses the selected one when I release my finger. If I just click normally, it selects the default character.
Is there such a widget in the Android SDK, or can anyone give a hint on how to implement such a component.
See screenshot: Entering text, and just long pressed the "12#" button. "!" is currently selected.
Create a custom Activity with android:theme="#android:style/Theme.Dialog" (this will give it a transparent, floating dialog look).
Add to it a LinearLayout with android:orientation="horizontal"
Add some button with icons to LinearLayout. This creates a transparent Button with an Icon and some text beneath it:
<Button android:id="#+id/optionsButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dip"
android:text="#string/button_options_text"
android:textColor="#color/button_text_grey"
android:drawableTop="#drawable/button_options"
android:drawablePadding="-5dip"
android:background="#null"
Use Button.onKeyLongPress(..) to show this Activity.