Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't navigate between Input Fields? #15

Closed
MTaimurAzhar opened this issue Mar 26, 2019 · 16 comments
Closed

Can't navigate between Input Fields? #15

MTaimurAzhar opened this issue Mar 26, 2019 · 16 comments

Comments

@MTaimurAzhar
Copy link

Next, Done, Search don't work well.
1ac4fa95-48c9-4afc-be5f-8a69fd9f77a2

@mopsicus
Copy link
Owner

What is incorrect? Icon on button?

@MTaimurAzhar
Copy link
Author

Icon is fine, actually it doesn't take it to the next field because in plug-in, all new fields are being generated and original ones are hide, when I try to activate/focus on next field from this button, it doesn't focus on next field

@mopsicus
Copy link
Owner

Yeah, it's true. Select between default,next,done button is just icon representation. Functionality you should make by yourself by adding listener to OnReturn event:

public void OnReturn () { NextTextField.SetFocus(true); }

@MTaimurAzhar
Copy link
Author

I already applied the functionality through listener
and debugging its being called, but the issue is it doesn't focus on next field.

because it's trying to access the original field and original field is disabled by newly made fields.

how can I get reference or access of these newly made fields?

@mopsicus
Copy link
Owner

You should set fields in inspector or by code and apply focus to it. It should works.

public MobileInputField InputFirstText;
public MobileInputField InputSecondText;
...
public void OnReturn () { // set this to OnReturn on InputFirstText
    InputSecondText.SetFocus(true); 
}

@MTaimurAzhar
Copy link
Author

Thank you so much, it worked perfectly fine!

@MTaimurAzhar
Copy link
Author

One more thing,
As sprite I applied doesn't show,

1-a white image comes up on text as I go down. how can I avoid it?
2- how can I keep the original sprites and change them depending on the focus, and how can I avoid the this white image?

@mopsicus
Copy link
Owner

Set alpha to 0 for inputfield image normal color, and background will be transparent

@MTaimurAzhar
Copy link
Author

And font also gets changed.

@MTaimurAzhar
Copy link
Author

Set alpha to 0 for inputfield image normal color, and background will be transparent

Actually I am swiping the sprites rather than color change.

@mopsicus
Copy link
Owner

Font change now is not available. You can change font color only.

@MTaimurAzhar
Copy link
Author

Font change now is not available. You can change font colour only.

Actually I am not changing the font, was just using a bold font, but it appeared as light font different than original one.

@mopsicus
Copy link
Owner

Ok, will check it

@MTaimurAzhar
Copy link
Author

Does it allow to swipe the sprites??

Untitled

@mopsicus
Copy link
Owner

In current realization just these params can be send to plugin:

            public bool Multiline;
            public Color TextColor;
            public Color BackgroundColor;
            public string ContentType;
            public string InputType;
            public string KeyboardType;
            public float FontSize;
            public string Align;
            public string Placeholder;
            public Color PlaceholderColor;
            public int CharacterLimit;

@MTaimurAzhar
Copy link
Author

I see, thank you so much for quick replies and for this package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants