Specifying virtual keyboard type for EditText in XML - Stack ...
文章推薦指數: 80 %
Try android:imeOptions or TextView#setImeOptions(). Check the docs. Home Public Questions Tags Users Collectives ExploreCollectives FindaJob Jobs Companies Teams StackOverflowforTeams –Collaborateandshareknowledgewithaprivategroup. CreateafreeTeam WhatisTeams? Teams CreatefreeTeam CollectivesonStackOverflow Findcentralized,trustedcontentandcollaboratearoundthetechnologiesyouusemost. Learnmore Teams Q&Aforwork Connectandshareknowledgewithinasinglelocationthatisstructuredandeasytosearch. Learnmore SpecifyingvirtualkeyboardtypeforEditTextinXML AskQuestion Asked 11years,3monthsago Active 2years,3monthsago Viewed 7ktimes 2 I'mcreatingaListActivity.IneachlistitemIhaveaViewI'vecreatedwhichcontainsaRatingBarandanEditText.Inthescreenshotatthebottom,youcanseethevirtualkeyboardcontainsareturnlinekeyandno"Done"key.Iwouldliketospecifyadifferentstyleofkeyboardtouse(andhopefullyretainthespellcheckingbar).Iwouldlikemyvirtualkeyboardtohavea"Done"keyinsteadofareturnkey.CanIsetthestyleofvirtualkeyboardI'mwantingintheEditText'sXML?Ifso,how? Thanksforyourhelp androidandroid-edittextvirtual-keyboard Share Improvethisquestion Follow editedAug5'19at21:07 Glorfindel 20.3k1313goldbadges7070silverbadges9797bronzebadges askedAug11'10at19:33 AndrewAndrew 20.1k3131goldbadges9494silverbadges173173bronzebadges Addacomment | 2Answers 2 Active Oldest Votes 4 Tryandroid:imeOptionsorTextView#setImeOptions().Checkthedocs. Share Improvethisanswer Follow answeredAug11'10at19:49 benvdbenvd 5,75955goldbadges3838silverbadges5959bronzebadges 1 Thisworksbetterthanmyothersolution(myothersolutioncausedabug).However,Idohavetwoproblems:1)WhenIclicktheEditTexttobringupthekeyboard,theEditTextlosesfocusandIhavetoclickitagain.2)WhenIclick"Done"onthevirtualkeyboard,thefocusgoestomyRatingBar.Idonotwantthistohappen;soI'vesettheRatingBar'sclickableandfocusableattributestofalse,butyoucanstillfocusonit:\Isuspectbothproblemsarerelated.Anyideas? – Andrew Aug11'10at19:52 Addacomment | 1 Itwouldappear android:inputType="textImeMultiLine|textAutoCorrect" doesmostlywhatIwant.ItonlyallowsmetohavemyEditTextbe1row,though. Share Improvethisanswer Follow answeredAug11'10at19:49 AndrewAndrew 20.1k3131goldbadges9494silverbadges173173bronzebadges Addacomment | YourAnswer ThanksforcontributingananswertoStackOverflow!Pleasebesuretoanswerthequestion.Providedetailsandshareyourresearch!Butavoid…Askingforhelp,clarification,orrespondingtootheranswers.Makingstatementsbasedonopinion;backthemupwithreferencesorpersonalexperience.Tolearnmore,seeourtipsonwritinggreatanswers. Draftsaved Draftdiscarded Signuporlogin SignupusingGoogle SignupusingFacebook SignupusingEmailandPassword Submit Postasaguest Name Email Required,butnevershown PostYourAnswer Discard Byclicking“PostYourAnswer”,youagreetoourtermsofservice,privacypolicyandcookiepolicy Nottheansweryou'relookingfor?Browseotherquestionstaggedandroidandroid-edittextvirtual-keyboardoraskyourownquestion. TheOverflowBlog Whoownsthisoutage?BuildingintelligentescalationchainsformodernSRE Podcast395:Whoisbuildingcloudsfortheindependentdeveloper? FeaturedonMeta Nowlive:Afullyresponsiveprofile Reducingtheweightofourfooter TwoBornottwoB-Farewell,BoltClockandBhargav! Visitchat Linked 3 AndroidEditTextlistenerenter Related 364 Android:showsoftkeyboardautomaticallywhenfocusisonanEditText 310 HowtomakeEditTextnoteditablethroughXMLinAndroid? 412 FirstlettercapitalizationforEditText 477 PercentagewidthinaRelativeLayout 513 Howtoshowsoft-keyboardwhenedittextisfocused 0 Virtualkeyboardissueinandroid 0 avoidthevirtualkeyboardpopup 10 EditTextinListViewhiddenbykeyboardwhenfocused 3 retainEditTextproportionwhenadjustResizeandsoftkeyboardareon 32 PositioningEditTextAboveKeyboard HotNetworkQuestions Whyarecerealgrainssoimportanttoagricultureandcivilization? Viewsversusafunctionforgettingthetoprecordsofatable? Couldanyequationhavepredictedtheresultsofthissimulation? Minimumnumberofrunwaysrequiredforinternationalairports? Islookingforplaintextstringsonanencrypteddiskagoodtest? Whydon'tclimatechangeagreementsself-terminateifparticipantsfailtomeettheircommitments? Foraspacecraftorbitingaplanet,orbitalspeedisinverselyproportionaltoorbitradius.Butspeedmustbeincreasedtoincreaseorbitradius? Howcomemodelpredictionaccuracyhighbutmodeldoesnotgeneralisewell Adjustbrakestoavoiddeflatingtireforremoval In-TransitWaitingAreainUSAAirports? WhatcrimesdidRosenbaumcommitwhenheengagedRittenhouse? Isitoktofeedmycatonechickenliverdaily? Whatdoesitmeantograntachurchtoapriory? ConvertRegextoMask Where(inGermany)isthelandscapebehindthisnewsreader,withagazeboonasmall,lushsteephillsurroundedbyhigher,broaderforestedhills? WhyarelegaldecisionsintheUSsopoliticized? HowcanInotgetunfairlyblamedforthingsbymyboss? HowcanIgettrue1"thickoakboards? Commenttraduire« HoweverlittleImayremember »? Whatdothescammersdowhentheygetaccesstosomeone'sonlinebanking? DemerzelandtheLawsofRobotics WhyistheSecondAmendmentstructureddifferentlyfromallotheramendments? WhatshouldIdoideallytorechargeduringaPhD? Skippingcertainnumbersinalist morehotquestions Questionfeed SubscribetoRSS Questionfeed TosubscribetothisRSSfeed,copyandpastethisURLintoyourRSSreader. default Yourprivacy Byclicking“Acceptallcookies”,youagreeStackExchangecanstorecookiesonyourdeviceanddiscloseinformationinaccordancewithourCookiePolicy. Acceptallcookies Customizesettings
延伸文章資訊
- 1The Soft Keyboard on Android | PSPDFKit
The soft keyboard (also called the onscreen keyboard) is the main input method on Android devices...
- 2Working with the Soft Keyboard | CodePath Android Cliffnotes
The Android system shows an on-screen keyboard, known as a soft input method, when a text field i...
- 3SoftKeyboard.java - android Git repositories
Example of writing an input method for a soft keyboard. This code is ... We are now going to init...
- 4Specify the input method type | Android Developers
Specify the keyboard type; Enable spelling suggestions and other ... the appropriate soft input m...
- 5Specifying virtual keyboard type for EditText in XML - Stack ...
Try android:imeOptions or TextView#setImeOptions(). Check the docs.