B4A Library [Class] CustomInput

I have created a custom input dialog (non modal) that allows customization.

This is version 1

It requires the IME library.

The attached project shows how to use it.

I will spend some more time on it when I wake up.

regards, Ricky
 

Attachments

Last edited:
This is great. I love animation effect on the list.
Love it.
Only I need to edit some cenetring with panel because on my Lg Optimus P500 don't show whole screen

Here is screenshoot:
 
I have coded it to suit my Samsung s2 which is 800x480 at 1.5 scale. I only write stuff for myself.

You can change it to suit your device. What are the specs of your phone? I could test it on the emulator. I have to admit I don't know much about different screen sizes and programming for them.

Regards, Ricky
 
Don't worry Ricky D
I have edited to see how it looks on my resolution 320x480

I edited just some left,top position :)
Code: Copy
   pnl.AddView(lTitle, 0dip, 0dip, 100%x, 40dip)
   pnl.AddView(aceInput, 0dip, 80dip, 320dip, 80dip)
   pnl.AddView(bOk, 0dip, 200dip, 160dip, 80dip)
   pnl.AddView(bCancel, 160dip, 200dip, 160dip, 80dip)
   
   m_act.AddView(pnl, 0, 0, 100%x, 100%y)

Here is screenshoot:

 
Well done.

I'll try to find out the INPUT_TYPE enumeration so we don't need to use

Code: Copy
Dim et As EditText
inp. setInputType(et. INPUT_TYPE_TEXT)

It would look like

Code: Copy
inp. setInputType(inp. INPUT_TYPE_TEXT)

I'll look at it after I get up from sleep later. I'll incorporate the changes you made

Regards, Ricky
 
v1.1

Tidied up the ui

Added some setTitle methods

Incorporated the INPUT_TYPE

Added a new parameter to Initialize - allowreturn as boolean
set this to false if you don't want the ReturnFrom sub to fire if NotInList fires

Added autodocumentation
 
Last edited:
How do I make my 1.1 version appear in the 1st post?

regards, Ricky
 
Edit mode doesn't give me a way to add an attachment.

Any ideas?

regards, Ricky
 
I've tried that and this is what happens

View attachment 12324I have created a custom input dialog (non modal) that allows customization.

This is version 1

It requires the IME library.

The attached project shows how to use it.

I will spend some more time on it when I wake up.

regards, Ricky

P.S Latest version is 1.1 in post #6


the 12324 is hightlighted inside tags

This happens when I click on the little paperclip then a little popup comes saying manage the item.

What am I supposed to do?

I can't delete or re-add anything.

regards, Ricky
 
Last edited:
Ok I got it sorted.

1.1 is now on post #1.

Original is still there too

regards, Ricky
 
You might have code like

Code: Copy
Dim i As Int
Msgbox("we don't have a way to get user input from code. "," ") 
'so we use an object to get it

If we are working on an activity then using an EditText would be fine but I have times when I need to get something from me when there isn't an activity to put one on.

Regards, Ricky
 
You can pass the activity to the class and add views (see attached), but by having the views as globals in the class, it becomes an activity object and cannot be Dimmed as a process global.

I don't think this will break integrity perhaps someone will comment if it does.
 

Attachments

Last edited:
I'm not sure what you mean.

regards, Ricky
 
Perhaps I misunderstood you, I thought you were saying that you couldn't use an edit text in a class.
 
Ok. You did misunderstand lol. But then again I'm not the best at explaining myself.

This class contains an autocompleteeditext view.

Regards, Ricky
 
Back
Top