I am new to Android development. Created a simple application with a webview. Webview loads a url. Now I want to disable only one button from the website. How can I do that using the class name of the button?
you shouldn't. if you decided to make a web GUI then handle actions in "web" way (JS?). if you want to handle natively clicks and other actions (different gestures, scroll, etc.) then make native GUI with XML. making such hybrid as you decribed, while possible e.g. using JS interface for making communication web<->native sides, is waste of time and resources (for handling whole GUI, especially so basic actions like clicks or enablind/disabling items)
Related
I need to add an additional button to the right of the system buttons, as shown in the photo. clicking on it will perform a specific action related to my app. Can this be done?
In general: No. There's not an API for this, only the OS can control the navigation area. Consider also the problems you'd run into with the variety of system navigation styles available, many of which, like gesture navigation, don't even have buttons.
Some apps fake things with screen overlays that reimplement some or all of the navigation and/or hide the system navigation, but you're going to run into all of the above issues doing so, plus the issues inherent in screen overlays, plus you'll have no guarantee that however you do it will continue to work into the future. I wouldn't recommend trying this approach.
In my app I have a webview to show the user some information from a web page. Before seeing the info though, you have to choose an option on a dropdown list on the webpage. Is there any way I can choose the right option for the user (via code) and only have them see the content?
You can run arbitrary javascript inside a WebView, initiated from Java. Be sure you have javascript enabled. Once you've done that,
theWebView.loadUrl( "javascript:alert('Hello')" );
is the mechanism to invoke javascript functions or scripts. To pre-select a drop-down, you may want to include jquery or such, making the selection easier.
I got a flash document I CAN'T modify, that starts its animations only when pressing a button it has on it. I tried EVERY script I found on the internet but nothing worked. I need to simulate the click on that button so the flash animation can start! Is this possible?
If there are no APIs (which give you access to the elements),
you cannot interact with the Flash UI, because the Flash content has its own context, where JavaScript has no access to it.
You can try to decompile your flash file and get FLA-project of it. There it is possible to make required changes and create new swf.
There are many swf decompilers, but there is no 100% guarantee for successful decompilation (especially for big and complicated flash applications)
I was wondering if it's possible in android to embed an application into in another application. In this way you can have control of the embed application and you can add some other functionalities thanks to the parent application.
EDIT :
To be more accurate, I would like to have an application (parent application ) which can overlay the content of another application (embed application) without losing control of the parent application.
Thank you,
You can not specifically embed one app in another. And unless there is a specific inter-application API you have available to you, you cannot control the one app from your parent app either.
However if you just want to be able to view your parent app as some kind of overlay over another app, there are techniques that you might find useful.
It is possible to create an overlay view that can be seen when other apps are in the foreground. This is used by some chat clients, video playback, and task launchers. You can find some info on this method by looking at my answer here:
Background app to listen to Drag gestures
It is important to realise that in "the old days", a technique like this could be used to steal data from someone's phone. It was possible to receive taps & drags, and then pass them on to the other app.
This was a security hole, and has been fixed. So these days, you can choose if your overlay view should receive the taps or not i.e. if it is interactive, or just shows info.
Because of this, you will not want to cover up any of the "embedded" app with your own UI.
It is not possible any more to receive taps in your app, and pass them through to the other app.
This is not possible in general. The only thing that comes close is "embedding" an app widget in a home screen.
I spent hundreds of hours writing an HTML5 application.This application deals with multiple popups and I suddenly ran into a problem when managing them.
My main goal would be bring a blurred popup window to front by focusing it.I am wondering if this is possible in JavaScript.
If not, could I use java applet in order to gain more functionality on my popup windows. Could I perhaps embed Google V8’s engine in order to render my existing HTML5 code in this application?
when you open a window you create a reference to it. You can then use that reference to call focus() on.
var foo = window.open( /*params*/ );
foo.focus();