D doogal Member Licensed User Longtime User Feb 24, 2015 #1 I have a edittext that no longer wraps like it should. I have the following code in my app: I found this on the forums and it used to work. Code: Activity.LoadLayout("edit") edtPurpose.InputType = Bit.OR(edtPurpose.INPUT_TYPE_TEXT, 16384) edtPurpose.Wrap = True I also have: SingleLine = False Wrap = True in Designer and it looks like this: Also, how can I go back to the box style edittext versus the line. Where the line looks more elegant some users like the box style. Thank you, Douglas
I have a edittext that no longer wraps like it should. I have the following code in my app: I found this on the forums and it used to work. Code: Activity.LoadLayout("edit") edtPurpose.InputType = Bit.OR(edtPurpose.INPUT_TYPE_TEXT, 16384) edtPurpose.Wrap = True I also have: SingleLine = False Wrap = True in Designer and it looks like this: Also, how can I go back to the box style edittext versus the line. Where the line looks more elegant some users like the box style. Thank you, Douglas
klaus Expert Licensed User Longtime User Feb 24, 2015 #2 What is the Gravity value ? It is probably set to CENTER. You should set it to edtPurpose.Gravity = Bit.OR(Gravity.LEFT, Gravity.TOP) The text size seems big according to the EditText.Height. Upvote 0
What is the Gravity value ? It is probably set to CENTER. You should set it to edtPurpose.Gravity = Bit.OR(Gravity.LEFT, Gravity.TOP) The text size seems big according to the EditText.Height.
D doogal Member Licensed User Longtime User Feb 24, 2015 #3 Klaus, Thank you for your quick response. Gravity is already set in designer just like you show Left and Top. Does it need to be set in code like wrap for it to work correctly? The edittext.height is 90 and textsize is 14. Here is a scaled down version of what I am working with if you don't mind taking a look. Douglas Attachments test.zip test.zip 104.3 KB · Views: 575 Upvote 0
Klaus, Thank you for your quick response. Gravity is already set in designer just like you show Left and Top. Does it need to be set in code like wrap for it to work correctly? The edittext.height is 90 and textsize is 14. Here is a scaled down version of what I am working with if you don't mind taking a look. Douglas
klaus Expert Licensed User Longtime User Feb 24, 2015 #4 I see it too. I played with your code and see that setting the input type resets SingleLine to true. You need to add edtPurpose.SingleLine = False. Upvote 0
I see it too. I played with your code and see that setting the input type resets SingleLine to true. You need to add edtPurpose.SingleLine = False.
D doogal Member Licensed User Longtime User Feb 24, 2015 #5 Thank you that worked. I don't understand though it used to work without this. My other question was how to get the box style back? I saw somewhere on the forum about target a lower sdk. I can't seem to find it at the moment. Do you know of a way to get this style back? Again. Thank you. Upvote 0
Thank you that worked. I don't understand though it used to work without this. My other question was how to get the box style back? I saw somewhere on the forum about target a lower sdk. I can't seem to find it at the moment. Do you know of a way to get this style back? Again. Thank you.
klaus Expert Licensed User Longtime User Feb 24, 2015 #6 On my Sony xperia z1 commenting this line in the Manifest Editor shows the box style. 'SetApplicationAttribute(android:theme, "@android:style/Theme.Holo") Upvote 0
On my Sony xperia z1 commenting this line in the Manifest Editor shows the box style. 'SetApplicationAttribute(android:theme, "@android:style/Theme.Holo")