How to implement EditText with providing suggestion same like a Google search provides in Android...
I am trying to implement an EditText which takes a url from user and loads the desired url in the webview. I have accomplished this task. Now I want to provide corresponding suggestions of urls on typing a word in the EditText same like as Google provides. I have a sample application from google play store which has implemented this scenario.
URL to the app: https://play.google.com/store/apps/details?id=video.downloader.videodownloader&hl=en
I have searched every where to find a clue to start my work. But I couldn't find anything supportive.
Screen Shots for figuring out the Scenario:
Screen Shot
Screen Shot
Screen Shot
I am not using any database to fetch data from and to show in suggestion. I want to use EditText like an address bar of Google browser. When a user tap and type any word, it gives suggested urls respectively as showing in the screen shots.
android google-chrome android-edittext google-search-api
|
show 11 more comments
I am trying to implement an EditText which takes a url from user and loads the desired url in the webview. I have accomplished this task. Now I want to provide corresponding suggestions of urls on typing a word in the EditText same like as Google provides. I have a sample application from google play store which has implemented this scenario.
URL to the app: https://play.google.com/store/apps/details?id=video.downloader.videodownloader&hl=en
I have searched every where to find a clue to start my work. But I couldn't find anything supportive.
Screen Shots for figuring out the Scenario:
Screen Shot
Screen Shot
Screen Shot
I am not using any database to fetch data from and to show in suggestion. I want to use EditText like an address bar of Google browser. When a user tap and type any word, it gives suggested urls respectively as showing in the screen shots.
android google-chrome android-edittext google-search-api
2
see stackoverflow.com/a/19860624/2252830
– pskink
Nov 15 '18 at 7:56
How would we use this piece of code to search in google urls..? As its getting suggestions from wikipedia. I changed the url with "google.com" inside String urlString and run again the app. Its not showing any suggestion. Thanks for your notice..
– Hami Khan
Nov 15 '18 at 8:38
this is your job to provide your data - i have no idea where you want to get suggestions from...
– pskink
Nov 15 '18 at 8:39
Kindly, check screen shots. It will give you an idea about figuring out my question.
– Hami Khan
Nov 15 '18 at 11:08
did you run my code without any changes (just ^C and ^V)? does it look sinilar? if so, the only thing you have to do is to access your customUri
and get the suggestions from thatUri
– pskink
Nov 15 '18 at 11:10
|
show 11 more comments
I am trying to implement an EditText which takes a url from user and loads the desired url in the webview. I have accomplished this task. Now I want to provide corresponding suggestions of urls on typing a word in the EditText same like as Google provides. I have a sample application from google play store which has implemented this scenario.
URL to the app: https://play.google.com/store/apps/details?id=video.downloader.videodownloader&hl=en
I have searched every where to find a clue to start my work. But I couldn't find anything supportive.
Screen Shots for figuring out the Scenario:
Screen Shot
Screen Shot
Screen Shot
I am not using any database to fetch data from and to show in suggestion. I want to use EditText like an address bar of Google browser. When a user tap and type any word, it gives suggested urls respectively as showing in the screen shots.
android google-chrome android-edittext google-search-api
I am trying to implement an EditText which takes a url from user and loads the desired url in the webview. I have accomplished this task. Now I want to provide corresponding suggestions of urls on typing a word in the EditText same like as Google provides. I have a sample application from google play store which has implemented this scenario.
URL to the app: https://play.google.com/store/apps/details?id=video.downloader.videodownloader&hl=en
I have searched every where to find a clue to start my work. But I couldn't find anything supportive.
Screen Shots for figuring out the Scenario:
Screen Shot
Screen Shot
Screen Shot
I am not using any database to fetch data from and to show in suggestion. I want to use EditText like an address bar of Google browser. When a user tap and type any word, it gives suggested urls respectively as showing in the screen shots.
android google-chrome android-edittext google-search-api
android google-chrome android-edittext google-search-api
edited Nov 15 '18 at 22:01
halfer
14.4k758109
14.4k758109
asked Nov 15 '18 at 7:52
Hami KhanHami Khan
12
12
2
see stackoverflow.com/a/19860624/2252830
– pskink
Nov 15 '18 at 7:56
How would we use this piece of code to search in google urls..? As its getting suggestions from wikipedia. I changed the url with "google.com" inside String urlString and run again the app. Its not showing any suggestion. Thanks for your notice..
– Hami Khan
Nov 15 '18 at 8:38
this is your job to provide your data - i have no idea where you want to get suggestions from...
– pskink
Nov 15 '18 at 8:39
Kindly, check screen shots. It will give you an idea about figuring out my question.
– Hami Khan
Nov 15 '18 at 11:08
did you run my code without any changes (just ^C and ^V)? does it look sinilar? if so, the only thing you have to do is to access your customUri
and get the suggestions from thatUri
– pskink
Nov 15 '18 at 11:10
|
show 11 more comments
2
see stackoverflow.com/a/19860624/2252830
– pskink
Nov 15 '18 at 7:56
How would we use this piece of code to search in google urls..? As its getting suggestions from wikipedia. I changed the url with "google.com" inside String urlString and run again the app. Its not showing any suggestion. Thanks for your notice..
– Hami Khan
Nov 15 '18 at 8:38
this is your job to provide your data - i have no idea where you want to get suggestions from...
– pskink
Nov 15 '18 at 8:39
Kindly, check screen shots. It will give you an idea about figuring out my question.
– Hami Khan
Nov 15 '18 at 11:08
did you run my code without any changes (just ^C and ^V)? does it look sinilar? if so, the only thing you have to do is to access your customUri
and get the suggestions from thatUri
– pskink
Nov 15 '18 at 11:10
2
2
see stackoverflow.com/a/19860624/2252830
– pskink
Nov 15 '18 at 7:56
see stackoverflow.com/a/19860624/2252830
– pskink
Nov 15 '18 at 7:56
How would we use this piece of code to search in google urls..? As its getting suggestions from wikipedia. I changed the url with "google.com" inside String urlString and run again the app. Its not showing any suggestion. Thanks for your notice..
– Hami Khan
Nov 15 '18 at 8:38
How would we use this piece of code to search in google urls..? As its getting suggestions from wikipedia. I changed the url with "google.com" inside String urlString and run again the app. Its not showing any suggestion. Thanks for your notice..
– Hami Khan
Nov 15 '18 at 8:38
this is your job to provide your data - i have no idea where you want to get suggestions from...
– pskink
Nov 15 '18 at 8:39
this is your job to provide your data - i have no idea where you want to get suggestions from...
– pskink
Nov 15 '18 at 8:39
Kindly, check screen shots. It will give you an idea about figuring out my question.
– Hami Khan
Nov 15 '18 at 11:08
Kindly, check screen shots. It will give you an idea about figuring out my question.
– Hami Khan
Nov 15 '18 at 11:08
did you run my code without any changes (just ^C and ^V)? does it look sinilar? if so, the only thing you have to do is to access your custom
Uri
and get the suggestions from that Uri
– pskink
Nov 15 '18 at 11:10
did you run my code without any changes (just ^C and ^V)? does it look sinilar? if so, the only thing you have to do is to access your custom
Uri
and get the suggestions from that Uri
– pskink
Nov 15 '18 at 11:10
|
show 11 more comments
1 Answer
1
active
oldest
votes
I would use a search interface (documentation here: https://developer.android.com/guide/topics/search/) with a Content Provider. You should fill the content provider by using custom search JSON API https://developers.google.com/custom-search/v1/overview. It's a quite complicated task but I think you should start with this stack
I think your answer can help me. But I couldn't follow your suggestion. Can you help me what exactly should I do, to come with solution? Thanks for your kind suggestion.
– Hami Khan
Nov 15 '18 at 11:11
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53314667%2fhow-to-implement-edittext-with-providing-suggestion-same-like-a-google-search-pr%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I would use a search interface (documentation here: https://developer.android.com/guide/topics/search/) with a Content Provider. You should fill the content provider by using custom search JSON API https://developers.google.com/custom-search/v1/overview. It's a quite complicated task but I think you should start with this stack
I think your answer can help me. But I couldn't follow your suggestion. Can you help me what exactly should I do, to come with solution? Thanks for your kind suggestion.
– Hami Khan
Nov 15 '18 at 11:11
add a comment |
I would use a search interface (documentation here: https://developer.android.com/guide/topics/search/) with a Content Provider. You should fill the content provider by using custom search JSON API https://developers.google.com/custom-search/v1/overview. It's a quite complicated task but I think you should start with this stack
I think your answer can help me. But I couldn't follow your suggestion. Can you help me what exactly should I do, to come with solution? Thanks for your kind suggestion.
– Hami Khan
Nov 15 '18 at 11:11
add a comment |
I would use a search interface (documentation here: https://developer.android.com/guide/topics/search/) with a Content Provider. You should fill the content provider by using custom search JSON API https://developers.google.com/custom-search/v1/overview. It's a quite complicated task but I think you should start with this stack
I would use a search interface (documentation here: https://developer.android.com/guide/topics/search/) with a Content Provider. You should fill the content provider by using custom search JSON API https://developers.google.com/custom-search/v1/overview. It's a quite complicated task but I think you should start with this stack
answered Nov 15 '18 at 9:06
Nicola GallazziNicola Gallazzi
1,041517
1,041517
I think your answer can help me. But I couldn't follow your suggestion. Can you help me what exactly should I do, to come with solution? Thanks for your kind suggestion.
– Hami Khan
Nov 15 '18 at 11:11
add a comment |
I think your answer can help me. But I couldn't follow your suggestion. Can you help me what exactly should I do, to come with solution? Thanks for your kind suggestion.
– Hami Khan
Nov 15 '18 at 11:11
I think your answer can help me. But I couldn't follow your suggestion. Can you help me what exactly should I do, to come with solution? Thanks for your kind suggestion.
– Hami Khan
Nov 15 '18 at 11:11
I think your answer can help me. But I couldn't follow your suggestion. Can you help me what exactly should I do, to come with solution? Thanks for your kind suggestion.
– Hami Khan
Nov 15 '18 at 11:11
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53314667%2fhow-to-implement-edittext-with-providing-suggestion-same-like-a-google-search-pr%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
see stackoverflow.com/a/19860624/2252830
– pskink
Nov 15 '18 at 7:56
How would we use this piece of code to search in google urls..? As its getting suggestions from wikipedia. I changed the url with "google.com" inside String urlString and run again the app. Its not showing any suggestion. Thanks for your notice..
– Hami Khan
Nov 15 '18 at 8:38
this is your job to provide your data - i have no idea where you want to get suggestions from...
– pskink
Nov 15 '18 at 8:39
Kindly, check screen shots. It will give you an idea about figuring out my question.
– Hami Khan
Nov 15 '18 at 11:08
did you run my code without any changes (just ^C and ^V)? does it look sinilar? if so, the only thing you have to do is to access your custom
Uri
and get the suggestions from thatUri
– pskink
Nov 15 '18 at 11:10