How to open a webview over current layout in Android? - android

Been searching for this for a while. How do I open a webview that will appear on top of my current layout ? The webview will show a webpage from the internet where users enter their details and submit it.
If anyone has played with Facebook login, Twitter login, or even PayPal payment, they are all doing exactly what I want, a webview floating on top of the current layout please see the screenshot below:
please note, I will not create my own webview textboxes and buttons, it will be a webpage from a url that I wish to display in that webview

Just launch it in a Dialog.
Dialogs can be themed with custom layouts to look like pretty much anything.
If you still need more flexibility, try using a dialog themed Activity.

Related

WebView vs Chrome Custom Tab

I am building an app where in a Detail Activity I have to show a web page.
I was going to use WebView, but then I saw Chrome Custom Tab.
What do you guys think it's better to implement and why?
If you just want to show a certain page then I would suggest you use chrome custom tabs. You can style the toolbar in a way it resembles your app style and they are intended for showing content without you having to worry much about anything else.
if you want to have full control over what the user is doing inside this website you have to use a webview. (you can prevent the user clicking links on the webview, you could intercept data the user inputs into controls on the website...)
But this can also be a negative aspect since the user really has to trust you that you don't log his data or even fiddle with it.
summary: "The WebView is good solution if you are hosting your own content inside your app. If your app directs people to URLs outside your domain, we recommend that you use Chrome Custom Tabs"
-> If it isn't your website you probably should go with custom tabs.
https://developer.chrome.com/multidevice/android/customtabs#whentouse
Webview : If you want your own content which has click listeners and data interception you need to go to webview. But It wont share the state with the browser.
Chrome Custom tab : If You are just redirecting to a url, i prefer chrome custom tab. But it has little cons too. We wont change its title text color where we can change the titlebar color. The text color will be chosen by the theme color only. And We can add actions, but we cant change the overflow menu icon or the entire actions displayed in the overflow action.
Even though the limitation are not a big deal. I recommend chrome custom tab over webview.

android : Customize dropdown's radiobutton open from webview

I am developing android application which is based on the webview.
The page loaded in the WebView has dropdown. When I click on the drop down, a dialog appears(it is the native Android dialog).i want to apply my them for that dropdown dialog item. i have searched but solution not found for that.
FYI, I have implemented it in the native activity but not able to implement it in webview.I want dropdown alert like displayed in below image.
Please help me, if anyone knows related to this issue.
You need to understand the concept of a Webview. It is just like a browser which you are loading inside your activity. Your other activities in the app can not interact with the webview. If you want to change the style of your dropdown for android's webview, use Media Queries in your website which will change the view of your website when loaded for smaller devices

I want to show animation in my android activity inside the dialog

I want to show a dialog box having animation played guiding the user to perform operations. You can have a look at naukari.com android app where it is been shown. I don't know what the animation is like is it a swf or something gif or etc? please guide me for the same. If I could get what kind of resource is used to play that animation I can think on the similar lines. The link below shows the image representing the naukari.com app image.
animation inside a dialog

Android: how to show the user which view is active

I have an activity with a WebView. I would like to give the possibility to the user to scroll from one WebView to another WebView (as it's done to Android desktop):
with something in the bottom which shows which screen is actually viewed. I have think about the ScrollView but maybe something else exists which easier to use.
what you want to use is the ViewPager
http://android-developers.blogspot.de/2011/08/horizontal-view-swiping-with-viewpager.html
To get an indicator which shows on what page the user is use:
http://jakewharton.com/viewpagerindicator/
An example how to use it is here:
http://blog.stylingandroid.com/archives/537

Page turn/flip with button click for android

I am working on page curl/turn animation with button click and I couldn't able to do it. Because I am new to Android and I searched a lot through Google, someone please share your knowledge with the example code for the animation
I am working on a sign-in page with username,email as text-view elements with edit text boxes, and Signin and Register are the two buttons
When I click the Register button the page should turn/flip to a new Register page and for signin button It should show an Alert dialog after submitting the credentials
Help is always appreciated, Thanks.!
Yes, you can have as many layout (.xml) pages as you'd like. When you desire to use one simply call setContentView(signin) or something alike.
You need to learn to explore your options before you post a question, thus creating two threads about the same topic. Look through the documentation and then here.

Categories

Resources