Hi All,
I am a Android developer need quick help on a strange issue with Samsung Captivate. I use android:windowSoftInputMode="adjustPan" for an activity which has a list of EditText in it. The page can expand by adding more EditText views, when it grows long and onFocus of last field soft keyboard pops up and the activity doesn't completely push up. So the EditText view falls behind the soft keyboard.
The strange thing is same the activity moves up for all other Android devices like HTC Aria, Xeperia, etc. Only Samsung Captivate doesn't move up completely, not sure why its device specific.
With regards,
Visva
Related
Hey all,
I've managed to get a far better response on my keyboard by making a simple change. I find it surprising that the keyboard issue only affects Pocket Outlook, I've never had a problem elsewhere.
Anyway, the fix is to change the keyboard repeat settings. In Settings/System/Keyboard, click "Repeats Setting" and increase the "Delay before first repeat". Now this is where it gets wierd...Outlook actually ignores this setting. It's labeled as "up/down key repeat setting" and it does actually control the up/down action on the Today screen in the same way as the same control on a regular computer. But it doesn't work on the hardware keyboard on the phone, and I expect that this incompatibility leads to the problem. It reminds me a lot of http://en.wikipedia.org/wiki/Switch#Contact_bounce in electronics, basically you aren't getting a clean "key down" then "key up" event from each keypress.
Hope this helps some of you!
The problem in Messaging is that every time you type a letter into the message field the horizontal scrollbar appears and disappears. This happens every keypress. Since keypress = keyDown + keyUp, and the scrollbar appears during keyDown, the OS sometimes (quite often when you type fast) misess the keyUp event, repeating and repeating and repeating the processing of keyDown event.
The kb lag is present in ALL apps (try typing FAST in Notes), but most of the apps do not do anything specific between keyDown and keyUp, thus the lag is not as easy to 'notice'.
Yeah, I still get the scrollbar problem, however before making this change Messaging was completely unusable for me. I had to wait 1sec between key presses otherwise I just get gobbledygook on the screen. It was very frustrating and I assumed that's what people refered to by "keyboard lag". The scrollbar thing is a different problem altogether and just a minor annoyance for me now, a purely visual one.
At the moment I can type "the quick brown fox..." in both Messaging and Notes at full speed with no errors. Yesterday I could not do that in Messaging at all.
Yup... The MOST annoying thing about the kblag is the backspace-key auto-repeat :|
I just slided the setting to 7 and it's great now. Thanks fraser.
First of all, I HAVE googled through this site looking for a solution to my "problem", and I haven't found it.
My problem is with the H/W keyboard layout- specifically the two "soft buttons" at the top. I keep hitting them when typing the R, T, I or O keys, and when I am in the middle of typing emails, it sends my email- and that is NOT what I really wanted to happen.
So the fix would be for the O/S (WM6.1 ATT ROM in my case) to ignore the softkeys on the keyboard all the time. I can live with that, as long as the front buttons are not disabled at the same time. Is there a way I can do that through the registry?
Hey everyone
Iam new here and in android programing.
So iam working on some assignment that i got in class which i need to build
an app with 3 buttons one to add an event one to show all events and one to delet(the delet one is not must to do).
ive build all the buttons and now i want to work on the button add event so when i clicked on him he will lead me to new page which there i will have text
boxes when i can fill information and etc...
and when i will clicked on show all event its will lead me into new page which will print all the events i have in the Arraylist till now.
i know i need to do it all in the main activity but how i do that from where i should extends?
Thank you Adi
You have to initialize the Button ypi have added in the activity
Then set an OnClickListener
Sent from my GT-I9195 using XDA Free mobile app
adids1221 said:
Hey everyone
Iam new here and in android programing.
So iam working on some assignment that i got in class which i need to build
an app with 3 buttons one to add an event one to show all events and one to delet(the delet one is not must to do).
ive build all the buttons and now i want to work on the button add event so when i clicked on him he will lead me to new page which there i will have text
boxes when i can fill information and etc...
and when i will clicked on show all event its will lead me into new page which will print all the events i have in the Arraylist till now.
i know i need to do it all in the main activity but how i do that from where i should extends?
Thank you Adi
Click to expand...
Click to collapse
Look at our code https://github.com/MOSP-Development/android_mosp_SFNote_package
Sent from my SM-G530H using XDA Free mobile app
hello
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
-----------
button = (Button) findViewById(R.id.button1);
button.setOnClickListener(new OnClickListener() {/* Some Code */ });
button1 is created on an android layout you refer to (main.xml) :
I'm kinda new to Android Studio so I will be grateful if you can help me with my question. How can I enter some text and add it to a ListView with the use of a Bundle?
For example, say I enter a name in the EditText component in the MainActivty, and then when I press the OK button, it will be seen in to another Activity in a List View.
I've been using Bundles to transfer text to another Activity but I can't figure out how to transfer text to ListView.
Soshiron said:
I'm kinda new to Android Studio so I will be grateful if you can help me with my question. How can I enter some text and add it to a ListView with the use of a Bundle?
For example, say I enter a name in the EditText component in the MainActivty, and then when I press the OK button, it will be seen in to another Activity in a List View.
I've been using Bundles to transfer text to another Activity but I can't figure out how to transfer text to ListView.
Click to expand...
Click to collapse
Well this one is a bit tricky but nothing out of the ordinary. You know how to pass data between activities using bundle and intents. Now what you have to do is retrieve the string you want from the bundle. Update your array or List that holds the info for your listview and call notifydatasetchanged() on your listview adapter.
If you need more help let me know
Hi guys,
I am new to android app development and have started creating my first simple app in Android Studio. So far everything is working, I have a drawer menu, the user can switch between screens, back button in the activity bar etc.
As I learned the basics with tutorials on the internet I could not find an answer to one question.
Some tutorials suggest/show that you should switch the Fragments when navigating to another screens when selecting an item from the drawer. So I create Fragments and when someone clicks on a button I change the fragment.
However there are also Activities, and I can make the same thing work by creating new Activities for each screen the user should see.
I cannot really see a clear benefit from one method compared to the other. Switching Fragments may be less work but may also get more messy.
What is in general the best practice here? Create Fragments for each menu item and switch the Fragments or create a new Activity for each menu item?
thanks
Arret
Arret said:
Hi guys,
I am new to android app development and have started creating my first simple app in Android Studio. So far everything is working, I have a drawer menu, the user can switch between screens, back button in the activity bar etc.
As I learned the basics with tutorials on the internet I could not find an answer to one question.
Some tutorials suggest/show that you should switch the Fragments when navigating to another screens when selecting an item from the drawer. So I create Fragments and when someone clicks on a button I change the fragment.
However there are also Activities, and I can make the same thing work by creating new Activities for each screen the user should see.
I cannot really see a clear benefit from one method compared to the other. Switching Fragments may be less work but may also get more messy.
What is in general the best practice here? Create Fragments for each menu item and switch the Fragments or create a new Activity for each menu item?
thanks
Arret
Click to expand...
Click to collapse
When using a navigation drawer fragments is the best technique.
All your fragments are housed inside one activity which will allow navigation through drawer. If you start new activity on item select, you will lose the navigation drawer(because new activity will not have the navigation drawer). Even if you add a navigation drawer in all activities you create, the flow itself will be a mess.
Also using many activities can make app look heavy. Fragments on the other hand are very light and provide good layout options(search coordinator layout).
Fragments vs Activity
It depends on the app that your working on.
With activity, it is very hard to achieve re-usability of components. Where as fragments can be used to create reusable modules.
If you see in modules in your activity, then go for one activity and fragment each module.
It may not be strictly one activity per app.