Setting AllowsTab in TextView disables Multiline
See original GitHub issueIt seems that turning off ‘AllowsTab’ setting in TextView
also disables Mutliline
. Is this a bug or is there a there a reason why we can’t have a multi line editor where tab insertion is disabled?
[Fact]
public void TextView_MultiLineButWithoutTabs()
{
var view = new TextView ();
// the default for TextView
Assert.True (view.Multiline);
view.AllowsTab = false;
Assert.False (view.AllowsTab);
Assert.True (view.Multiline); // crashes here
}
To me AllowsTab
should be whether when the user presses TAB a tab gets inserted. So the rendering/layout would be standard regardless of this setting (e.g. \t
is tabWidth spaces).
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:13
Top Results From Across the Web
Multiline TextView in Android?
I was trying to get multi line textviews in my slide-drawer menu ... Simply set the inputType and the TextView will adapt to...
Read more >How do I set the multiple lines in TextView Android Studio?
If you want the TextView to always have four lines regardless of the length of the text in it, set the android:lines attribute:...
Read more >Android multiline TextView with accurate width
In short, the TextView thinks: well, there is not enough the maximum allowed by parent width to render the entire text so I...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes having turned a pure enum into [Flags] like this sounds dangerous. Can you do a minimum repro unit test of how we are currently checking the property and how it results in ambiguity? Maybe as a new issue?
I found a solution for this by using
Equals
.e.KeyEvent.Key.Equals (Key.Q | Key.CtrlMask)
Edit: It’s enough using the
==
keyword.e.KeyEvent.Key == (Key.Q | Key.CtrlMask)