René's URL Explorer Experiment


Title: [FR] easier way to override native view creation · Issue #5456 · NativeScript/NativeScript · GitHub

Open Graph Title: [FR] easier way to override native view creation · Issue #5456 · NativeScript/NativeScript

X Title: [FR] easier way to override native view creation · Issue #5456 · NativeScript/NativeScript

Description: This is on android (but the request might also be for iOS) I am trying to modify the textfield to handle back pressed when the soft keyboard is shown. I want to make it so that it also blurs the textfield. On android you need to override...

Open Graph Description: This is on android (but the request might also be for iOS) I am trying to modify the textfield to handle back pressed when the soft keyboard is shown. I want to make it so that it also blurs the te...

X Description: This is on android (but the request might also be for iOS) I am trying to modify the textfield to handle back pressed when the soft keyboard is shown. I want to make it so that it also blurs the te...

Opengraph URL: https://github.com/NativeScript/NativeScript/issues/5456

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[FR] easier way to override native view creation","articleBody":"This is on android (but the request might also be for iOS)\r\n\r\nI am trying to modify the textfield to handle back pressed when the soft keyboard is shown.\r\nI want to make it so that it also blurs the textfield.\r\n\r\nOn android you need to override  ```dispatchKeyEventPreIme``` on the ```EditText``` as shown [here](https://stackoverflow.com/questions/3940127/intercept-back-button-from-soft-keyboard)\r\n\r\nSo do that i can simply create a custom ```EditText``` android class.\r\nThen i need to subclass nativescript TextField class to override the ```createNativeView```\r\nI tested it and it works great.\r\nThe issue is that the ```createNativeView``` in textfield do more than just returning a new ```EditText```. It also create the events. So it means that i need to copy all that code back into my custom class.\r\n\r\nThere is a simple fix, and it would be a good practice for all classes, which to have class method like \r\n``` protected newNativeView(): android.widget.EditText``` (textfield example) which would be called inside the ```createNativeView```.\r\nThat way any subclass could return its own subclass of ```android.widget.EditText```\r\n\r\nDoing that for all widgets would make it dead easy to add native functionalities which require overriding native functions.","author":{"url":"https://github.com/farfromrefug","@type":"Person","name":"farfromrefug"},"datePublished":"2018-02-22T15:46:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/5456/NativeScript/issues/5456"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:61e4bbb7-ef63-b8fb-7834-6130712f72bd
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB206:25FEC4:2F9DA19:413F74B:6973C8F2
html-safe-nonce4f9953ad7a1c778f4ee7c7e946f4bb220a825f78a0da43b88d6812551decd0f6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjA2OjI1RkVDNDoyRjlEQTE5OjQxM0Y3NEI6Njk3M0M4RjIiLCJ2aXNpdG9yX2lkIjoiNzcxOTYzNTQ1Nzc5NjE5NjU5NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac1cf0457c465ce3c199030a256a9013f1ea37c753cca03f9c0858dfe8ea86b64f
hovercard-subject-tagissue:299403449
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/NativeScript/5456/issue_layout
twitter:imagehttps://opengraph.githubassets.com/8ad5b2667b19280e02171b6a6cb03dd43ba9a88defaff9f8f01a9b4cbdaded63/NativeScript/NativeScript/issues/5456
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8ad5b2667b19280e02171b6a6cb03dd43ba9a88defaff9f8f01a9b4cbdaded63/NativeScript/NativeScript/issues/5456
og:image:altThis is on android (but the request might also be for iOS) I am trying to modify the textfield to handle back pressed when the soft keyboard is shown. I want to make it so that it also blurs the te...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamefarfromrefug
hostnamegithub.com
expected-hostnamegithub.com
Nonecee21c7b1ab632710d33905bc72e5e9e520eab75c9a12e16c2ce9e8f6e031e06
turbo-cache-controlno-preview
go-importgithub.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id31492490
octolytics-dimension-repository_nwoNativeScript/NativeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31492490
octolytics-dimension-repository_network_root_nwoNativeScript/NativeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef5f1d4f67b002a74550b90d5c1c0f0899544c742
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/NativeScript/NativeScript/issues/5456#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fissues%2F5456
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fissues%2F5456
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=NativeScript%2FNativeScript
Reloadhttps://github.com/NativeScript/NativeScript/issues/5456
Reloadhttps://github.com/NativeScript/NativeScript/issues/5456
Reloadhttps://github.com/NativeScript/NativeScript/issues/5456
NativeScript https://github.com/NativeScript
NativeScripthttps://github.com/NativeScript/NativeScript
Please reload this pagehttps://github.com/NativeScript/NativeScript/issues/5456
Notifications https://github.com/login?return_to=%2FNativeScript%2FNativeScript
Fork 1.7k https://github.com/login?return_to=%2FNativeScript%2FNativeScript
Star 25.4k https://github.com/login?return_to=%2FNativeScript%2FNativeScript
Code https://github.com/NativeScript/NativeScript
Issues 869 https://github.com/NativeScript/NativeScript/issues
Pull requests 59 https://github.com/NativeScript/NativeScript/pulls
Discussions https://github.com/NativeScript/NativeScript/discussions
Actions https://github.com/NativeScript/NativeScript/actions
Projects 0 https://github.com/NativeScript/NativeScript/projects
Wiki https://github.com/NativeScript/NativeScript/wiki
Security 0 https://github.com/NativeScript/NativeScript/security
Insights https://github.com/NativeScript/NativeScript/pulse
Code https://github.com/NativeScript/NativeScript
Issues https://github.com/NativeScript/NativeScript/issues
Pull requests https://github.com/NativeScript/NativeScript/pulls
Discussions https://github.com/NativeScript/NativeScript/discussions
Actions https://github.com/NativeScript/NativeScript/actions
Projects https://github.com/NativeScript/NativeScript/projects
Wiki https://github.com/NativeScript/NativeScript/wiki
Security https://github.com/NativeScript/NativeScript/security
Insights https://github.com/NativeScript/NativeScript/pulse
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/5456
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/5456
[FR] easier way to override native view creationhttps://github.com/NativeScript/NativeScript/issues/5456#top
os: androidhttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22os%3A%20android%22
https://github.com/farfromrefug
https://github.com/farfromrefug
farfromrefughttps://github.com/farfromrefug
on Feb 22, 2018https://github.com/NativeScript/NativeScript/issues/5456#issue-299403449
herehttps://stackoverflow.com/questions/3940127/intercept-back-button-from-soft-keyboard
os: androidhttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22os%3A%20android%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.