How to implement EditText with providing suggestion same like a Google search provides in Android...












0















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.










share|improve this question




















  • 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 that Uri

    – pskink
    Nov 15 '18 at 11:10


















0















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.










share|improve this question




















  • 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 that Uri

    – pskink
    Nov 15 '18 at 11:10
















0












0








0








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.










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 custom Uri and get the suggestions from that Uri

    – pskink
    Nov 15 '18 at 11:10
















  • 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 that Uri

    – 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














1 Answer
1






active

oldest

votes


















0














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






share|improve this answer
























  • 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













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
});


}
});














draft saved

draft discarded


















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









0














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






share|improve this answer
























  • 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


















0














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






share|improve this answer
























  • 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
















0












0








0







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






share|improve this answer













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







share|improve this answer












share|improve this answer



share|improve this answer










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





















  • 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




















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







這個網誌中的熱門文章

Tangent Lines Diagram Along Smooth Curve

Yusuf al-Mu'taman ibn Hud

Zucchini