Android :: WebView Displays Black Screen
Feb 2, 2010
I have a listview that when you click on an item it will take you to a WebView that displays some static formatted text associated with that list entry.
I had it all working with a TextView but I wanted to be able to use HTML formatting for the text and figured the WebView was the way to go. Right now it is just supposed to display a generic link for testing purposes but when the viewContent intent starts it just goes to a black screen. I can go back and pick another entry and it also just shows the black screen.
I'm not sure what code you are going to want to see so here's the viewSection class file and the viewsection.xml layout.
viewSection.java:
CODE:..............
viewsection.xml:
CODE:..................
View 1 Replies
May 3, 2009
Can anyone confirm the fact that webview is broken in the 1.5 sdk? Either that, or update the code page on the google developer side as neither that code nor any other (including my previously working webview code) is showing anything but a blank black screen.
View 19 Replies
View Related
Dec 30, 2009
I've been banging my head against a wall this afternoon trying to get a WebView to work. Below is the code in the main class:
public class fkyougoogle extends Activity {
/** Called when the activity is first created. */
WebView webview;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
webview = (WebView) findViewById(R.id.webview);
webview.getSettings().setJavaScriptEnabled(true);
// WORKS
//webview.loadUrl("http://www.google.com");
// DOESN'T WORK
//webview.loadUrl("http://www.theregister.co.uk");
//webview.loadData("<html><body>hello</body></html>", "text/html", "utf-8");
//webview.loadDataWithBaseURL("fake://", "<html><body>hello</body></html>", "text/html", "utf-8", "http://www.theregister.co.uk/");}}
This is Google's "Hello, Webview" example. If I use a WebView and try to access www.google.com then it works fine. If I try to access any other site then it fails including loadData and it just displays a black screen in the emulator. In the end I would like to read from a local file.
is included under the manifest tag and the XML schema is the same as the Hello Webview example.
Am I missing something obvious here?
View 2 Replies
View Related
Oct 14, 2010
I run a site that offers .pkg files to my users for download to there device. The issue is instead of downloading the .pkg file it just displays the raw code of the .pkg file in the webview. How can I get this to force download to the root of the sd card? Here is what I have
package com.ps3brew.view;
import com.ps3brew.view.R;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
public class WebViewExample extends Activity {..........................
View 2 Replies
View Related
Oct 31, 2010
Using WebViewClient and/or the WebChromeClient you can get a listener for when the page has loaded, however this is sometimes called before the WebView has any content in it, before it has displayed anything. What would be a efficient method for determining when the WebView has displayed it's content? When I load a page in a WebView, I want to set the scroll to a specific position. It seems that the scroll position cannot be set until the page is loaded and it has an actual content height. So, I have tried two different approaches to determining when the page has finished loading, onPageFinished() from the WebViewClient and also onProgressChanged() from the WebChromeClient.
Both of these tell me when the page has finished loading. However, the problem is that sometimes it is called before the page has been displayed and therefore the page has no height and the scroll call does nothing. I am trying to find a solid way to determine when the page is ready to be scrolled, i.e. when it has its content height. I imagine I could setup a checking loop after it finished loading to keep looking for when the height is available but that seemed like quite the hack. Hoping there is a cleaner way.
View 2 Replies
View Related
Nov 9, 2010
I have a WebView that displays a Google Checkout payment button in an html form.
When I run it on the emulator it works, there is the payment button and I can press it and go to the google checkout webpage.
However, when I run it on an actual device running Android 2.2 it just shows the little blue box with a question mark.
what does this mean?
CODE:.....................
View 1 Replies
View Related
Aug 13, 2009
I have a layout with a TextView and a List, and in onCreate() I have the TextView request focus. On the G1 and emulator the screen comes up with the TextView having focus, and the on-screen keyboard will display when you tap on the TextView, but on the Galaxy apparently the on-screen keyboard is always displayed. Does anyone know why this would be so? And why would a phone without a keyboard act differently from a phone with a keyboard that's hidden--shouldn't they follow the same logic?
View 3 Replies
View Related
Nov 10, 2009
Suppose my application xyz stores a few contacts(just like in the address book/ telephone book). Other contacts are by-default stored in my Android address book. Suppose I receive a call on the handset with my app xyz running in the background. All I need is to fetch the Caller's name from the application xyz and display this name as" Akash Calling..." instead of "+91... calling..." assuming that caller's details are present in the application say, his name and none of his details in the actual address book. Is this feasible.
View 2 Replies
View Related
Mar 1, 2010
I am new to android programming and have a strong keen interest to learn it. I want to write a program that fetches the data from a website, segregates it and displays it on the screen of the phone. The data could be grocery list from a supermarket or sale items in a mall. Could you please suggest as to how I can go ahead and start this.
View 7 Replies
View Related
Jun 9, 2010
I have seen the below log message when navigating to the Account & sync settings screen but I am confused as to how to create an Intent to navigate there.I dont seem to have access to the ManageAccountsSettings for development.I just wanted to create an Intent such as below, but I cant call out ManageAccountsSettings.
View 1 Replies
View Related
Oct 26, 2010
Yesterday I was listening to Pandora and I wanted to snap a picture with my EVO, so I hit the 'Home' button and then opened the Camera app. After that the little camera icon showed in the middle of the screen for a second or two and disappeared. Next the screen was blank. I also tried the camcorder and the screen was also blank. I've done many resets/pulling the battery out and I still have no luck. Any ideas as to what is causing my camera to not work at all? The only way to exit out of the blank screen is to press the 'Home' button on the phone.
View 18 Replies
View Related
Feb 5, 2013
Is there an app out there that will leave the screen on while plugged in that displays the time and weather and maybe other things?
View 2 Replies
View Related
May 24, 2012
I'm looking for a camera app that displays a picture on my screen in transparency when taking another picture with the camera of the phone in order to do the same pic as done before ...
Any app already exists ? Or is there a tip to do this ? Taking a picture with a printed photo in the other hand is not very effective.
View 1 Replies
View Related
Aug 16, 2010
How do you apply the background so that it displays in its entirety on each screen rather than across all 5 homescreens?
View 3 Replies
View Related
Aug 9, 2010
When i fire up my youtube app, i get a quick black screen flash and it goes back to home screen. The app doesnt launch at all. It was working just fine for several months, all of a sudden it started doing this.
View 8 Replies
View Related
Dec 2, 2010
This was reported in the other thread about X8 Issues, but thought to start a new one to gather feedback from users. It's about the ''black screen'' freezing issue encountered by some users. I have had this several times since owning the phone for a few weeks, so it is a recurring issue. Problem: The phone hangs or appears to be shut down or become unresponsive suddenly. Pressing the hardware buttons doesn't help as the phone doesn't react at all. Solution: Take out cover and battery and restart.Observations: From my own observations, it's not actually a shutdown but a major freezing/hanging. Sometimes when it happens, I can still see vague shades of the display at an angle. After leaving the phone for a while in the pocket, the phone comes back to normal again. Not sure if this is true for all users with this problem. Anyway, gathering more feedback to see how prevalent the problem is, to evaluate whether I should take it to the SE service centre, or whether doing so will help at all.
View 3 Replies
View Related
Jun 23, 2010
1) After I make a call, the screen goes black in a matter of seconds. I'm typically using a headset when I notice this. To end the call (or enter numbers in a call menu) I need to press the sleep button to get the screen to light up again. This is a pain in the a$$.I have the screen timeout set for 2 mins.
2) About once or twice a day the home screen will lock where I can't press anything. I need to reboot to fix.
View 7 Replies
View Related
Sep 9, 2010
Sometimes when I hit the screen/power button the screen will stay black and i can see the menu bar up top fine but all else is black. If I hit the home key then all lights up fine. Then sometimes Ill hit the button and it works fine.
View 3 Replies
View Related
Dec 2, 2009
I installed panda home just now and i get a black screen. I tried a battery pull, phone reset, etc. I cant get past the black screen. Is there any way I can boot in safe more or something? I literally cant use my phone, all I see is the task bar at the top and no buttons.
View 1 Replies
View Related
Mar 23, 2010
i opened my application after i am not doing any kind of operation i leave the mobile 5 min after 5 min when i touch the my application it is showing black screen.is there any way to avoid this idle state.
View 1 Replies
View Related
Jul 2, 2010
My PreferenceActivity contains a nested PreferenceScreen in another PreferenceScreen and I'm applying a theme to my PrefenceActivity that changes the background color. However when I open the nested PreferenceScreen I get a black background and I cannot see the options.This happens with android 2.1 , but it does not happen with android 1.6.Any ideas on how this can be corrected?
View 1 Replies
View Related
Aug 13, 2009
in my app, I came into an Activity from the pre Activity's UI (such as:click a TextView which has added OnClickListener), like this way, after several times, I came into a deeper Activity. I left it for a while (such as left away) , when I came back ,I returned the Activity before the last Activity. then I got a black screen.
View 3 Replies
View Related
May 22, 2009
I have a slideshow function in my app and if the number of images is more, the phone locks (screen goes black) in the middle of the slideshow. How can I avoid this in my app?
View 3 Replies
View Related
Feb 23, 2010
I have T-mobile touch with android on it. I want to use Barcode scanner, but when i turn it on, the screen is black, and all i see is that red line on the center. It's like my camera is not turning on. I also tried on my cousins phone (exactly the same) and the Barcode scanner app worked fine. I tried many times all over again but the problem is the same everytime. BTW when i try to take photo my camera is working fine.
View 8 Replies
View Related
Jul 17, 2009
There is an activity which fetches xml data from the network, parses it and displays it in the UI. When the user clicks on any of the link or button on the screen I call startActivity with new Intent object of the same activity. I do this to have the activity on the history stack. Previously I just called setContentView of the activity without starting the activity again, but with this I cannot have the previous page in the history stack.Now the problem is - each screen normally takes up to 20 seconds to fetch content, parse and display. when the startActivity is called the screen becomes black until the next UI is rendered. I wanted to keep the previous screen showing until the next page loads.Please tell me 1. Is there a way to do this? 2. Is it good to start the activity again for each page. If not how to have the previous page in the history stack so that I can use the Android's back button.
View 6 Replies
View Related
Mar 16, 2010
I'm trying the camera preview
This is my code and it doesn't throw any error, but the screen still black, any ideas?
this.setContentView(R.layout.camerapreview);
SurfaceView cameraSurface = (SurfaceView)findViewById(R.id.cpPreview);
SurfaceHolder holder = cameraSurface.getHolder();
holder.addCallback(this);
holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
this.camera = Camera.open();
this.camera.setPreviewDisplay(holder);
this.camera.startPreview();}
View 2 Replies
View Related
Feb 5, 2014
My Tablet shows black screen after a while animation android logo and no more work. So I tried factory reset. But factory reset doesn't proceed to recover menu. It shows only factory reset logo (Android logo with red triangle) like screenshot.
My tab has only 3 button (power, Volume up and down). I tried both of them. But the logo doesn't move. How to factory reset?
My tab Configuration:
Duocore M7200 7inch, 1.2GHz, 512MB DDR3
View 9 Replies
View Related
Jul 8, 2010
when i click on talk icon it goes to a black screen as if it was gonna launch google talk but then goes right back to main menu screen.
View 1 Replies
View Related
Sep 22, 2010
I've a lot of initialization code in my main activity's onCreate(). When I launch my game, the screen goes black for a long time, then my game appears. I did logged some message at the start and end of onCreate() and found that onCreate() is executing its code while the screen is black. Sometimes the screen goes black for too long and phone shows a popup dialog prompting me to choose between Force close/Wait. Then when onCreate() is completed, my game appears. Choosing 'Wait' then dismiss the dialog.
I tried using progress dialog described in this article:
http://developer.android.com/guide/topics/ui/dialogs.html#ProgressDialog
But it doesn't work. The screen goes black for the same amount of time even after I use the progress dialog.
View 4 Replies
View Related
Jul 29, 2010
Dad was using the phone trying to send a facebook message and got impatient. Then the screen went black.I'm using Lock 2.0,but the original lock on my Droid and when I slide it to unlock my screen turns black.I've turned it off twice and took out the battery.
View 2 Replies
View Related