yashsingh1/xdaforums huggingface dataset:
[Java for Android App Development] SimplicityApks:
So you mean it works perfectly without the focusableInTouchMode="true"? Strange... Then just leave the focus there and hide the softkeyboard in your onCreate() or is there any other reason you don't to have it in focus except for the soft keyboard popping up? (Then set the focus to another view might be the easiest ;) ).
[Java for Android App Development] kva123:
I tried hiding the softkeyboard but for some reason it wont hide it just keeps popping up. And he main reason I do not want a focus is because I have a drawerlayout on the app and it contains 3 edit texts so everytime I open the drawer layout it invokes the keyboard to pop up and it selects the edit text which I do not want because its a feature where users may customize the value which they dont need to if they dont want too. As of setting focus to another view I believe I tried that but the edit text still receives the focus for some reason. Mind giving me an example of setting focus on something else? So i can make sure I am doing it right. Maybe a Linear or Relative Layout .

I just tried to hide the keyboard and just realized I am already hiding the keyboard but I am only hiding the default keyboard not the custom keyboard. So my question for you would be how would I hide the Custom Keyboard from showing oncreate?(tried this but no luck customKeyboard.hideCustomKeyboard(); ) it still shows but it does work because i tried it with an onlclick just not working on start. Not sure if you need to edit the customkeyboard java file. If you want I can post the test code im working with right now if you dont mind looking at it.
[Java for Android App Development] SimplicityApks:
As for your focus, you'd want a (clickable) view that should be focussed by default, a Button for instance. Just call requestFocus() on that Button in your onResume() and that Button will be focussed. See here for more information on handling focus.

Your call to customKeyboard.hideCustomKeyboard() should in theory work fine ;). I'm just not sure if didn't call it too early, try doing it in onResume() or even later... It should be doable without editing the keyboard class.
[Java for Android App Development] kva123:
Well I am assuming the customKeyboard.hideCustomKeyboard() was just glitched when i tried it. I just tried it again and it worked but this time i put it in onstart and oncreate. And I just ran into another problem. I am currently working with a drawer in the application my problem is when i invoke the custom keyboard for the edit text in the drawer the keyboard is behind the drawer any idea how to fix it? I know if it was the softkeyboard you can fix it using adjustpan and adjustresize but have no idea how to approach this using a customkeyboard class. Any suggestions? By the way thanks for all the help I really do appreciate it.
[Java for Android App Development] SimplicityApks:
That is a very good question, it should be the same problem with a SlidingPaneLayout. I have to test it as well and see what works and what doesn't, but my guess would be to have a FrameLayout as the top view group instead of the DrawerLayout and then have the KeyboardView as a second child after the DrawerLayout (because FrameLayout allows overlapping). It could be that the DrawerLayout has some issues when it is not the topmost view, so we'd have to test that.
[Java for Android App Development] kva123:
Yeah I just tried that its not working and Im assuming its because of the drawerlayout. You can only have 2 views the main and the drawer so if I put any other view it will result in the drawer always being open making android confused in which is the drawer. Is there a way to bring forth the keyboard when or even override the first parent view? an example would be lets say I have a frame layout and the width is 240dp and I have in that a relative layout that I want to match the screen size. Is there a way I specify to match the parent of that parent lol if that makes sense so rather than matching 240dp it will match the parent of that which is already at match_parent.
[Java for Android App Development] SimplicityApks:
Oh I think you got that wrong, you've put the FrameLayout with the KeyboardView inside the DrawerLayout, right? What I meant was to completely switch the root view from a DrawerLayout to a FrameLayout and have the drawer as one of its childs like so:

<FrameLayout ...>
<DrawerLayout ...>
<!-- Navigation view, e.g <ListView .../> -->
<!-- Content view, e.g. <RelativeLayout .../> -->
</DrawerLayout>
<KeyboardView
android:layout_gravity="bottom" ... />
</FrameLayout>

Note that the DrawerLayout is still as large as the whole screen (everything in the FrameLayout and the DrawerLayout should be set to match_parent), only the KeyboardView is overlapping it on the bottom (regardless whether the drawer is open or not).

Be shure to tell once you've tested that, because I'm interested and I might need that as well ;). If your question about bringing views to the front is still valid, try view.bringToFront()
[Java for Android App Development] kva123:
Alright just did that problem with that is the entire drawer layout doesnt have a response yes it gets invoked and you can open the drawer but the problem is if you click anywhere inside the drawer it closes. any idea why this is ?
[Java for Android App Development] kva123:
Alright scratch the first post lol I think I got it only thing is when you are using that layout you have to do a few things via code it doesnt work in xml for some reason.

first you have too

onCreate

You have to request this its a must or the keyboard wont work properly
Billtotal.setFocusableInTouchMode(true);
Billtotal.setFocusable(true);
Billtotal.requestFocus();

Then

customKeyboard.hideCustomKeyboard();

OpenSettings.setOnClickListener(new OnClickListener(){

public void onClick(View v){

if(mDrawerLayout.isDrawerOpen(mDrawer)){

mDrawerLayout.closeDrawer(mDrawer);

//This is a must when you you have to clear the focus from the contact layout or button or whatever the contact is in your case then repeat what you did in oncreate

Contact.clearFocus();

Billtotal.setFocusableInTouchMode(true);
Billtotal.setFocusable(true);
Billtotal.requestFocus();

}
else{

mDrawerLayout.openDrawer(mDrawer);

//When you open the layout you have to clear the focus from the main layout

Billtotal.clearFocus();

//Should be the first time you set everything on the Contact

Contact.setFocusable(true);
Contact.setFocusableInTouchMode(true);
Contact.requestFocus();

}

}
});
[Java for Android App Development] SimplicityApks:
NIce so you got it working? Yeah what you're doing with the onClickListener might indeed be necessary, since the drawer would normally always be in focus. Only thing is that I think you don't need the calls to setFocusable(true) and setFocusableInTouchMode(true) every time, a simple requestFocus() (and clearFocus()) should suffice. I'd set the focusable="true" and focusableInTouchMode="true" in your xml layout ;). Great you've figured it out! :good:
[Java for Android App Development] kva123:
Well First thing is it works that way but now the problem im running into is no matter what edit text i click the focus wont change to the other ones so in other words i would not be able to change any other value except the one that always has focus. Any idea how to fix that?

---------- Post added at 09:13 PM ---------- Previous post was at 08:26 PM ----------

This also looks like its happening in any activity not because it is a drawer. I just tested it out on a normal activity and if you have more than one edit text fields and you try to requestfocus it wont change from the first to the second or third. I even tried clearing it and then calling request focus. If you have any idea in how to fix it lemme know
[Java for Android App Development] kva123:
Any Idea how to fix the edittext issue? If you get time I recommend making a clean activity and putting 3 texts next to each other and trying to request focus between the 3 and see if they change for me it doesnt i have no idea why but i might be doing something wrong.
[Java for Android App Development] kva123:
Found the solution !!!!!

Alright finally I found something that works :P

et1.setOnTouchListener(new View.OnTouchListener()
{
@Override
public boolean onTouch(View v, MotionEvent event) {
View dialerNumber;
final boolean ret = et1.onTouchEvent(event);
final InputMethodManager imm = ((InputMethodManager) getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE));
try {
imm.hideSoftInputFromWindow(et1.getApplicationWindowToken(), 0);
} catch (Exception e) {
e.printStackTrace();
}
return ret;
}
});

Alright pretty much we are able to change focuses using the ontouch and then we are manually hiding the softkeyboard once again within the ontouch thank god hopefully i dont run into any more issues lol
[Java for Android App Development] SimplicityApks:
Great you got it working yourself! But what is that dialerNumber view for, is it even being used anywhere?
[Java for Android App Development] kva123:
Opps thanks for catching that na its not being used anywhere that was just a mistake.

Also how do you open another keyboard view from a custom? For example lets say i have a normal keyboard and I want to open a symbols view so i can put @,!,#, and so on how would I invoke that view? I'm assuming I would link the keyboard to another layout when a button is clicked or something lol not exactly sure how to approach it. Or when I swype from right to left it pans over to another view? How would you recommend I do this ? And would you mind giving me an example? Oh and I am trying to add the custom keyboard to a dialogue. Not sure if that is possible and if it is I think I would have to implement it in a different way.
[Java for Android App Development] SimplicityApks:
There are a few options to handle the additional keys, you could use a dialog as I described in the guide (just call showNewInsertDialog() in the onKey() method). That is probably the easiest and quite nice if you need to explain your extra signs a bit more because you have a whole line instead of one char ;). Then there is the KeyboardView's popup menu. To use that you need to declare the android:popupKeyboard to inflate and the android:popupCharacters to be inflated in that layout for every Key that should have a popup on long press. Read what Maarten Pennings writes about it in chapter 3.4.5 for a better understanding and images.

It should be possible to have a second screen to which you can swipe over for the additional symbols. My guess is to wrap 2 KeyboardViews in a ViewPager so that you can swipe over nicely (contrary to registering the touch event yourself and animating a Keyboard swap). This should work though I have not tried it yet.

Wanting the custom keyboard in a dialog is I think where it starts to get really complex... As it is not so easy (if possible at all) to draw a view outside a dialog's bounds (like we want to have the KeyoardView here on the bottom of the screen), I'd suggest expanding the dialog full screen or at least to the bottom and fooling the user to think the bounds are smaller with a custom background. Depending on your dialog, you may need to rewrite your layout a bit to get it working, see here for an example of what I mean.
[Java for Android App Development] kva123:
Ahh got ya. Well I guess I will just leave that out for now and release what I have and hopefully all would be well and maybe later on if i can figure out how to incorporate it into the dialogue I may do that then Its not like its a big issue Its a dialogue for crying out loud lol

Anyways Thanks for all the help really appreciate it I have thanked your posts atleast the ones I found very very useful.
[Java for Android App Development] kva123:
Not sure if you have ran into this problem yet but how do you hide the actionbar from starting up onstart? To explain when I open my app i see my custom actionbar but for a split second I see the default actionbar and the default title and what not and its just for a split second how would I get rid of the default actionbar and only show the custom onstart. So in other words any idea how to not show the default actionbar and only the custom the whole time from start to destroy?

Won't let me respond normally hope you see this here

Well I guess it's the template I'm referring too and I believe it is a linear layout which has a horizontal orientation. And I have seen apps that do not show that like literally the only thing I see is the app's custom view. I should post my app on the market sometime today let me know what you think and if I can fix/improve anything further.
[Java for Android App Development] SimplicityApks:
Glad I could help you ;). What do you mean with custom ActionBar? is it a custom (linear) layout you have in your layout resource file and you hide the default system actoinbar? Or are you using ActionBarSherlock or ActionBarCompat? If the screen you see for friction of a second only has the actionbar with the app title in it, I think that is just a template that android will show to the user until it finishes loading the app (and that is not on all Android versions, I think only before KitKat). So the only way around that is inheriting the correct app theme in your manifest or making your app's startup faster ;). For instance as you want no actionbar, consider using a .NoActionBar theme (Theme.Holo.NoActionBar for instance).
[Java for Android App Development] oakonell:
KeyboardView from a Dialog

Hi,

I have this soft KeyboardView working when the EditText is on the main activity.

However, If I use an EditText on a Dialog/DialogFragment, when the soft KeyboardView (which is on the activity's layout!) is shown, it is "behind" the dialog, and not focused, and didn't adjust the dialog's layout (eg, resize or scroll).

Is this KeyboardView intended to work with Dialogs as well?

Thanks,

Rob
[Java for Android App Development] oakonell:
KeyboardView from a Dialog [pics]

Here's some pics to show what I mean.

The first one is from the activity, and it works (pretty much) fine as I want.

The second if from a dialog, owned by the same activity, but it doesn't really work.
[Java for Android App Development] SimplicityApks:
Hi, I noticed your problem and discussed it with someone else a while ago, I just can't find it anymore (lol)... I think we came to the conclusion that there is not a convenient solution because the keyboard is a view (which means it could theoretically be placed into any view container such as a list or grid view, funnily). What you have to do is make the dialog larger so it is as large as the screen (at least on the bottom) and then set a different background so that it looks like it's smaller. Then place the KeyboardView on the bottom of the dialog layout again and you should have a working keyboard in foreground. Only a tap on the side, where the dialog's background is transparent, will need to close the dialog.

This is like pseudo placing a view outside a dialog's bounds, as described in this question here.

And for your dialog resizements, I'm afraid you'd have to do those yourself...

These issues all occur because we're using this left-in-the-dark, poorly-documented KeyboardView API (which wasn't that great in the first place).
[Java for Android App Development] tagy22:
Thanks for this guide.

Does anyone know how to modify the background of the CAPS key:

<Key android:codes="-1" android:keyLabel="CAPS" android:keyEdgeFlags="left"/>

by default it has a green light when you call keyboard.setShift(true). But when I added the following to modify the look of the keys to keyboard.xml:

android:keyBackground="@drawable/keyboardbutton"

And keyboardbutton.xml:

<selector xmlns:android="hxxp://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/mykeypressed" android:state_selected="true"></item>
<item android:drawable="@drawable/mykeypressed" android:state_pressed="true"></item>
<item android:drawable="@drawable/mykey"></item>
</selector>

Now the CAPS key does not have the green light when enabled, how can I specify a different background for this key when it is enabled?
[Java for Android App Development] SimplicityApks:
I don't have time to test it out myself, so just a quick guess: It seems like it is not using the state_selected or _pressed drawable for activated CAPS LOCK. Maybe you need to use android:state_checked and/or one of the other modifiers you can use for an xml state list here.
[Java for Android App Development] blanco360:
Hey guys, appreciate this thread hasn't been visited for a while - but hopefully someone is still monitoring it!

Got everything working perfectly except for one thing.

The screen won't scroll up based on the edittext box's position. So on a lot of my layouts, the edittext is actually getting hidden by the keyboard when it pops up. (especially on phones with small screens)

I see someone asked about this a few pages back, but no solution was mentioned - is this still the case? I need some way to shift the page up when the keyboard opens (if it is over the edittext field) like a real soft keyboard would - anyone ever crack this?

cheers!
[Java for Android App Development] SimplicityApks:
Hi,

sorry that it took me so long to respond, I haven't been very active lately. The problem you're having is one of the caveats working with the keyboardview, as it is not really a soft keyboard. I don't think there is a really good solution for it, I worked around it in my apps by placing the text fields at the top of the screen :P (that is probably not a solution for you). You could however adjust a dummy view's size when the keyboard is opened and closed so the textfield is moved up as soon as the keyboard appears.
[Java for Android App Development] mdtarik:
KeyboardView with multiple layouts

Hello Simplicity

It's been a nice guide to share with us. Just I have a question. I need to develop a same keyboard like you, but with multiple keyboard-layouts. For example, I need to have a button in my keyboard which will allow my users to switch among 3 button sets (say, layout switch key) , 1. Numeric Keypads 2. Alphabetic Keypad 3. Some special characters Keypad.

This feature is available in standard android keyboard also. But I'm confused how to do it, which method to use and when to use. Do I need to design 3 keyboard-xml for 3 views? And then when user presses any layout-switch-key, I need to call setKeyboard with a new keyboard-instance with required layout from xml.

Am I on the right path? How can I implement this feature? Any idea?
[Java for Android App Development] JMHaro:
Custom button text

Hi,

I know again this is an old thread, but if still being monitored, is there anyway to put in the subscript text on a key? I'm trying to do a custom numeric keyboard for a passcode login that basically all I want to do is replace the Done button with the fingerprint icon to toggle a fingerprint login screen. I've got the icon OK, but the problem I'm having is that I still want to display the Alpha character text beside each number similar to:

2 ABC

If I can get the subscript text to be in light gray also, that would be great.
[Xperia Z1 Q&A, Help & Troubleshooting] WorldIRC:
Are there screen protectors pre-installed on the Xperia Z1? I can't tell...
[Xperia Z1 Q&A, Help & Troubleshooting] eintracht1895:
Yes, there are screen protectors on front and back.
[Xperia Z1 Q&A, Help & Troubleshooting] WorldIRC:
That could explain the big attraction to dust...
[Android General] Jasi2169:
Any kernel developer can help me for making kernel ?
[JASJAR, XDA Exec, MDA Pro General] dullard:
Does anyone know of any good alarm software that's compatible with the universal? The built in alarm gives up the ghost before I'm even half way to waking. I'm currently using my old treo just for getting me up in the mornings.
[JASJAR, XDA Exec, MDA Pro General] gaspx:
I'm also on the lookout for a decent piece of Alarm software, but in the meantime, you can use this:

apReminder+ http://www.apsoftsystems.com/apreminderplus/index.htm

I haven't tried it with an "alarm", but for calendar notifications it does a good job (I use Calendar events for wake up calls..) It basically see's the notification and then plays whatever you tell it to, up to 100 times at whatever interval.. pretty effective wake up tool! ;)

Its not quite WM5 aware, in that Landscape mode doesn't work.. you won't be able to click the Run button to save the settings, so just make sure its in portrait first. It also plays silly buggers with the screen if you start it off in landscape and then change to portrait, so bear that in mind. Other than that, its ace. :)
[JASJAR, XDA Exec, MDA Pro General] must_dash:
I have been using pTravelAlarm for some time, both on the Universal and my previous BA. It has muliple, selectably repeatable alarms and you can choice the sound or music to go with it. They have also issued a 'fixed' version for MM5 pending a final upgrade to it.

From burroak.on.ca
[JASJAR, XDA Exec, MDA Pro General] SiliconS:
I've just been reading their FAQ and it confirms that if you password protect your device after a period powered down, then you can't see the snooze/dismiss screen of pTravelAlarm when it wakes you up in the morning. It's hidden behind the WM5 password screen.

How do users of pTravelAlarm get around this problem? It seems pretty fundamental to me. Pity though - a decent alarm clock app would be v.useful. :)
[JASJAR, XDA Exec, MDA Pro General] khaledelfeki:
I'm using SPB time V. 1.1.

I was using it with my old PDA2K, and now using the same with Jasjar.

doing well so far.
[JASJAR, XDA Exec, MDA Pro General] thehustler:
does spb time bring your system out of standby. I have noticed that it does not. the alarm only rings when I switch on the backlight and bring the system out of standby.
[JASJAR, XDA Exec, MDA Pro General] khaledelfeki:
Same with me, spb does not bring my system out of standby.

I used to manually set my device not to turn off device if not used for (--) minutes from the power setttings before going to sleep. This is the only way to get the alarm working and I think it's copatibility problem with WM5 as this version of the software was designed for WM2003 and still no up-grade is developed.

Regards,
[JASJAR, XDA Exec, MDA Pro General] khanh_xda:
Chronos for Pocket PC

I used this one it's very good can play MP3 and can select custom sound stored in memory or on the storage card.

http://www.eldos.com/chronos/index.php
[JASJAR, XDA Exec, MDA Pro General] marsonist:
I'll vote seconds for Chronos... I've been using it for years now, and have never once had it miss an alarm. It's quite configurable and does it's one thing (alarms) very very well
[JASJAR, XDA Exec, MDA Pro General] dima_the_chief:
! FIXED!!!

Hello All!

After 3 weeks of usage of my Qtek9000:

- all the Calendar notifications dissapeared (no text, no sound);

- the Alarms did have sound and vibra, but no text and Notification softbutton on the screen;

- alarms sounds could appear on their selfs on a random time and no Text on the screen.

I've searched the forum and it learned out that it is a Notification Que Issue.

It looks that upon a time, that que is being oversized or some mess (duplicates?) happened in it.

So, after that the "Notification Que" Issue appears.

HOW I FIXED IT:

1. Get the MemMaid \ PocketMechanic app;

2. find and delete duplicates, SoftReset (SR) (no success so far);

3. delete up to 200 CALENDAR.EXE entries, (SR) (no success so far);

4. delete up to 100TASK.EXE entries, (SR) (no success so far);

5. delete .\\notificatiopn.....script... entries, (SR) (no success so far);

6. delete all repllog.exe entries (2) and SR- IT WORKS AGAIN !!! ;

From this case - I dont know which of the manipulations actually brought my notifications back alive (is that really the repllog.exe entry?)

The possible longterm solution may be a 3-rd party App, which performs scheduled Notification Que clean up?

This is a very annoying and awfull BUG in the WM5 !!!

As I don't believe the fillowing ROM releases will fix this critical bug, the only way out - is developing the system app to perform a scheduled Notification Que clean up.

All, please, give your feed back: your experience, knowledge on the subject, etc.

Thank you.