Android :: White Screen Appears In Main Activity?

Feb 15, 2010

public class Profile extends Activity{
WebView prof_webv;
private String selected_username;
private static final String INDEX = "http://14.143.227.140";

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.main);
prof_webv = (WebView) findViewById(R.id.mainwebview);
prof_webv.getSettings().setJavaScriptEnabled(true);
prof_webv.getSettings().setSupportZoom(false);
prof_webv.loadUrl(INDEX);}

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_BACK) ) {
finish();
return true;
}
return super.onKeyDown(keyCode, event);
}
}

This is my new Activity for a WebView. When the user clicks back, I simply want to close this Activity and return to my previous one. Notice, I put "onKeyDown" -> Finish. However, it's not working. Instead, I click "back", a blank white screen comes up.. (it doesn't even hit that onKeyDown Statement when I try to debug it)! When I hit "back" the second time, then it will go back to my previous Activity.

Android :: white screen appears in main Activity?


General :: Galaxy Y S5360 Screen Appears Completely White Like Flashlight

Jul 22, 2012

Whenever i start my samsung galaxy y s5360 screen appears completely white like a flashlight, but the phone is working i can recieve callls on my phone but cannot see anything on my device. even in dwnld mode & recovery mode the same problem persits, i cannot see anything .

I have installed custom creed v2.0 rom on my android device. Recently i have replaced motherboard of my device. Under Warranty.

I Want To Flash stock rom on my device but i cannot see anything on my device so i am unable to flash my device.

Another problem is that when i enter download mode odin detects my device but when i try to flash the rom it says unable to open com port.

At Present my device is working properly but when i restart my device the problem returns !!!!!!

View 1 Replies View Related

Android :: Texture Appears White In Real Device But Not In Emulator

Jul 23, 2009

Texture appears white in the real device but not in the emulator, Ive already tried to find the solution in other POSTS but none of the solutions worked. The problem that I have is that the loaded texture not displayed in the real device (G1, firmware 1.5). If I turn of the texture and put a color in the geometry, it works fine. Details: the file that Im loading has width and height power of 2. And I tried with .bmp and .png files, for both I had the same problem. My code: METHOD used to load texture: private int loadTexture (GL10 gl, Bitmap bmp) int[] tmp_tex= new int[1]; gl.glGenTextures(1, tmp_tex, 0.

View 10 Replies View Related

Android : Get Screen Dimensions In Main Activity?

Jun 19, 2009

I created some custom elements and I want to programatically place them to the upper right corner (n pixels from the top edge and m pixels from the right edge) therefore I need to get the screen width and screen height and then set position:

int px = screenWidth - m;
int py = screenWidth - n;

Does anyone know how to get screenWidth and screenHeight in the main Activity?

View 3 Replies View Related

Android :: How To Return From Preference Screen To Main Activity?

Oct 14, 2010

I have one main activity and one preference Activity. On my first activity I call menu and go on preference Activity by calling startActivityForResult. Code...

View 1 Replies View Related

Android : Way To Switch Over To Next Screen From Main Activity By Clicking On Button?

Nov 18, 2010

I am working on an application where I need to go to the next Screen form the Main Actvity when I Click on the Image Button of the Main Activity Screen. I had searched a bit on Net regarding this and found something like the OnClickListener method. I am still stuck for what exactly I want to do actually.

View 3 Replies View Related

Splash Screen And Main Activity?

Aug 22, 2013

I have written a code that stores all the videos for a certain playlist from YouTube in my database, now I want to design a button that checks if there is an updates on that playlist, for example: added video, deleted video,...and so on.

I want a splash screen to be displayed when checking if update occurred or not.Now I have my splash screen displayed but when it finishes I want to return from where I left from my main activity not to the beginning of my main activity.I had my splash screen in its on activity.

View 1 Replies View Related

Android :: Open Dialogue Activity Without Opening Main Activity Behind It

Jul 19, 2010

Im writing a program that offers a quick reply dialog upon receipt of an SMS.

However, I am getting an unexpected result. When I receieve an SMS, the appropriate dialog activity comes up displaying the correct phone number and message, however there is a second activity behind it that is the 'default' activity in my program (it is what opens when i launch my application)

I do not want this second activity to come up. The quick reply activity should come up by itself over top of whatever the user was doing before.

The 'floating' activity:

CODE:.........

The call to the activity inside an onReceive()

CODE:..............

The Manifest:

CODE:.................

View 1 Replies View Related

Android :: Passing Arguments From Loading Activity To Main Activity

May 16, 2010

I'm writing an application that starts with a loading activity. In the loading activity the app requests html from web and parses the html, then it sends the parsing result to the main activity. The main activity has several tabs, and contents of these tabs are based on the result of parsing.For example, the result of parsing is a list of strings ["apple", "banana", "orange"], and I need to pass this list to main activity, so that the main activity can create three tabs named after three fruits.I would like to know if there is any way to pass a list of strings among activities, BTW, is it the common way of do this?

View 2 Replies View Related

Android :: Start Activity When Main Activity Is Running In Background

Jan 10, 2010

I created an application which enables the user to set whether he wants to receive notification while the application runs in background mode. If the notifications are enabled an activity should be started (the dialog should appear on the screen).

I tried to enabled it the following way:

CODE:...........

This is the method from main activity. When onPause() is executed isRunningInBackground is set true.
When I tried to debug it when the main application was running in the background the line

startActivity(intent) had no effect (the activity didn't appear).

Does anyone know how to midify the logic in order to start an activity from the main activity when the main activity is running in the background (after onPause() is called)?

View 1 Replies View Related

Android :: Starting Second Activity From Main Activity On Button Click

Dec 4, 2009

Need an example of how to create/start a new activity from the main activity. I have a button click event on the main layout. Originally I just used setContentView(R.layout.secondactivity); which brings up the layout but I don't think that is correct since the secondactivity class is not instantiated at this point yet. I have looked for such an example and can not find one.

View 3 Replies View Related

Android :: App Widget Configure Activity Opens Main Activity

Jan 10, 2010

I hav an app that is like a relational database. There is a main app activity that users manage things with. There is also a widget that will display important info and add data to the database. When the widget is clicked, a configure class displays a way for the user to edit data. When the configure activity is done, the widget is updated and instead of going back to the home screen, the apps main activity is started. I can't find where the main activity is being called from. Wouldn't I have to create an intent and start Activity() to get this behavior? When done updating, I want the home screen and not my app.

View 3 Replies View Related

Android :: Main Activity To Browser Activity Error

Nov 7, 2010

I have a main activity, then i call a new activity intent from this. Lets call this SecondActivity. Then from my secont activity i call a browser intent. Then my browser intent call my second activity's onNewIntent method.Evereything work fine, but when i click on "back" button on my phone on my second activity, i will not going to my main activity, but the browsers activity, why?

View 1 Replies View Related

Android :: Soft Keyboard Appears When Activity Starts

Aug 13, 2010

I have an activity which loads a TableLayout. This is made up of TextView and EditView fields. When I run my app within the emulator the layout appears correctly (WITHOUT the soft keyboard appearing). When I run the app from a device (HTC Evo) and enter the activity the soft keyboard ALWAYS appears. I tried doing an OnFocusChange() for the first field in the layout and then doing:

InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(tvIndications.getWindowToken(), 0);

It doesn't work. The soft keyboard always appears.

View 4 Replies View Related

General :: Galaxy Y S6102 Screen Goes Blank / Nothing Appears Except Samsung Logo Screen

Apr 29, 2014

i have tried to install kitkat version for galaxy y duos s6102,for that i installed clockwork mod n cynogenmod n kitkat file..but after installing the screen goes blank,nothing appears except Samsung logo screen,

View 2 Replies View Related

Android :: Getting An Asset Outside Of Main Activity

Nov 30, 2009

From digging around a bit, getAssets() is an inherited method from ContextWrapper. It returns an AssetManager, and using open() it can return an InputStream. What I'm attempting to do at this point, is use the GLSurfuceViewActivity, Cube and CubeRenderer to work and learn off of and read in vertex data from a binary file. I've already created the binary output by parsing a model obj file and added to the assets directory. My Shape class (modified from the Cube class) does not have access to calling getAssets() since it's not a subclass of Activity or ContextWrapper. Once I accepted that, I tried to think of the best way to read in the data (without storing it extra places) to the Shape class. What I did, and seems to be working okay, was modify the Shape and ShapeRenderer constructors to accept an AssetManger as a parameter.

View 3 Replies View Related

Android :: Application Without Main Activity?

Oct 5, 2010

Is there a way to manage application activities by hand, like this: user activating an application from menu, it does some initialization, then creates some activity (is it necessar y to declare all activities in the application manifest?), and listens to it's events. On some event application decides to close one activity and open another - so it contains all the application logic. Didn't found anything like this in examples, they all have all the logic in the activity classes. Maybe I need to user Services? (Maybe I don't understand right, what an activity represents. For me it's like window in windows, or Displayable in j2me) I'm very new to android development, trying to understand the basics.

View 4 Replies View Related

Android :: How To Tab In Activity To Display Main.xml?

Apr 6, 2010

I am trying to make a app with the tuotrail of the developerspage, then I would like to display a main.xml in a tabview, instead the textview, wich in the tuotrail,is in the activity.How do I tell my tab in activity do display the main.xml?

View 1 Replies View Related

Android :: Service Updating Main Activity Gui

Aug 24, 2010

I have a service which collect data and send them to a certain URL and updating the main activity GUI, so which is better in the performance to use a long service with listeners to collect the data and threads in it to update the GUI and sends to the internet or to make another service responsible for updating the GUI and sending to the URL only while the first one just collects the data?

View 5 Replies View Related

Android :: Service Bound To Main Activity

Nov 11, 2010

so the application I've written has a service (that tracks GPS data) with a single main activity that binds to it with bindService in it's onStart() method, and unbinds from the service in it's onStop() method using unbindService( ServiceConnection ). I also have an activity which is an options screen, that is launched by pressing a button on the main activity. On this options screen, I have a checkbox that says "Run in background", which, if set to true, means that when the user exits the application with eier the Home or Back buttons, the service will continue running, not turning the GPS off. I do this by calling this.startForeground onUnbind, and this.stopForeground onRebind, if the setting is set to true, and stopping and starting my location reader onUnbind and onRebind respectively if the setting is false. If the service is running in the background, it also displays a notification to ensure the user understands that the GPS is still running and draining their power. This notification is displayed and stopped by relying on the startForeground and stopForeground methods......

View 1 Replies View Related

Android :: How To Come Back Main Activity From Child One?

Mar 30, 2010

I'm in a small problem.i have three activities (suppose A,B,C) after performing onclick event in activity A, i can go to activity B and then C..my question is that is there any way to comeback activity A from C..here is the code snippet public void on Create(Bundle Code...

View 3 Replies View Related

Android :: What Is Recommend Way To Get Main Activity From Child One?

Mar 29, 2010

My android application has 1 main activity. And it launches some sub-activity (which I wrote) and that also launches some sub-activity (which I wrote). I do this. My question is how can each of my sub-activity and sub-sub-activity get back to the Parent activity? Code...

View 2 Replies View Related

Android :: Initialize Preferences From XML In Main Activity

May 20, 2010

My problem is that when I start application and user didn't open my PreferenceActivity so when I retrieve them don't get any default values defined in my preference.xml file. Code...

View 3 Replies View Related

Android :: Push New Instance Of Main Activity?

Sep 2, 2010

Is it possible to create/push-onto-stack a new Activity of the same main Activity in an Android application with an argument passed to the Activities constructor? Specifically from a Dialog object...

View 1 Replies View Related

Android :: Email App Switch Its 'main' Activity?

Dec 4, 2009

In android Email app, when I first launch it, it will shows me the 'account setup wizard' activity. But when I launch the Email app(after the account is set) again, it wont' show the 'account setup wizard' activity, it will show the 'Folder list activity ' instead.

How can it does the main activity switch (depends on the email account setup)?

View 2 Replies View Related

Android :: Call Main Activity From BroadcastReceiver?

Oct 28, 2010

While developing an alarm based application, i have stuck in a scenario.

When my alarm is fired, i can receive the event in BroadCastReceiver::onReceive().
Within this function, i want to notify/call a function, which is located on MainActivity.

How to achieve the same?

View 1 Replies View Related

Android : How Can I Change Main / Launch Activity?

Jul 13, 2010

I think I already know the answer to this, but I just wanted to confirm (I think no horrible ramifications)...

View 5 Replies View Related

Android : Can App's Main Activity Be Bypassed On Launch?

May 9, 2010

Are there any scenarios on Android where a process can be instantiated (classes loaded, etc.) and a non-main activity launched without going through the main activity? Background: my app has a single main activity (android:name="android.intent.action.MAIN" and android:name="android.intent.category.LAUNCHER"), some secondary activities, and a preferences class providing static methods meant to be called from anywhere. These static methods' implementations require a Context, and so the class has a static Context member s_context; the static methods assert that s_context is non-null before using it. The very first thing I do in my main activity's onCreate() method is pass getApplicationContext() into the preferences class so it can set s_context.

View 2 Replies View Related

Android : How To Read An Asset From Outside Of Main Activity

Nov 8, 2010

I need to be able to be able to call readAsset from outside of the main activity of my application. I have heard people mention needing to pass the Context around, but the language has been very vague. Can someone describe the steps necessary to add the ability to call readAsset to an existing class that is not the main activity? Creating a public function in the main activity and having others call that will not work as the place I need to add readAsset to, is in a separate thread.

View 1 Replies View Related

Android :: ScrollView Disappears When Keyboard Appears On Screen

Aug 11, 2009

I have the following layout:

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/ android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/ android" android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content">

<TextView android:id="@+id/title" android:text="@string/.......................

When I click on the EditText "@+id/updateStatus" of the ScrollView, the keyboard appears on the screen of the device and the ScrollView is hidden. I'd prefer to hide the ListView "@+id/myListView" at the end. Is it possible? Why that view is hidden?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved