Android :: Creating Window Using C++
May 7, 2009Is there any way to create window on Android using C++.
View 2 RepliesIs there any way to create window on Android using C++.
View 2 RepliesI want to show a view on calling a Service API. Currently the only way looks like using the Toast class.
I tried the following after getting the WindowManager service, but it crashes at addView. I looked into the Toast class and found that it uses WindowManagerImpl which is not accessible publicly - is there any way to access the WindowManagerImpl functionality?
CODE:.................
What is the basic difference between the PhoneWindow and MidWindow policies? I found that the emulator version takes the implementations of the PhoneWindow.When the MidWindow implementations will be used? Also, I found that PhoneWindow handles the call settings implementation and the same is not there in MidWindow? Please someone help me pointing out the differences between both the policies and under which circumstances which one will be used.
View 6 Replies View Related<html>
<script language="javascript">
/* This function is invoked by the activity */
function wave() {
alert("1");
document.getElementById("droid").src="android_waving.png";
alert("2");
}
</script>
<body>
<!-- Calls into the javascript interface for the activity -->
<a onClick="window.demo.clickOnAndroid()"><div style="width:80px;
margin:0px auto;
padding:10px;
text-align:center;
border:2px solid #202020;" >
<img id="droid" src="android_normal.png"/><br>
Click me!
</div></a>
</body>
</html>
What is "window.demo.clickOnAndroid()"? I know that clickOnAndroid is a method in my Android application. But what is window and demo? My file is called demo.html. Is that it?
I was wondering how we would attach a pop up window to a button so that when the button is clicked the pop up window will appear showing a message and still until the user closes it. How should I go about this and what classes should I use? Also if there are any examples for this it would really helpful as well.
View 4 Replies View RelatedIs the 'Activity leaked window' issue (http://code.google.com/p/ beepmystuff/issues/detail?id=3) fixed in any of the latest Android releases? I'm not sure about the Android version I'm using. I get this error during orientation changes. I create PopupWindows inside TextView. When I change orientation when the popupwindow is shown, my log says Activity has leaked a window (popupwindow) and then sometimes the application crashes, but not always. When the application crashes, the log says 'Uncaught handler: thread main exiting due to uncaught exception java.lang.IllegalArgumentException: View not attached to window manager'
View 11 Replies View RelatedI would like to bring up a screen lock window. that constantly keeps popping up and doesn't allow users to get rid of it until he enters the right password.
View 4 Replies View RelatedI was playing around with the Motorola MotoDev IDE, which is kind of a jazzier front-end to Eclipse, and it asks you on startup if you want the Android emulator to show up in an IDE window. I said yes. That makes the emulator show up in an Eclipse tab, like the Console, Outline, etc. After a while it became apparent that MotoDev wasn't sufficiently different than Eclipse to make it worth the install. So I got rid of it. This is on Mac OS X with Snow Leopard. Now when I start Eclipse and run any Android project, even Hello world, the Console shows the emulator installing and the APK installing, and the Intent starting. But no emulator window. I found a setting in Eclipse->Preferences->Android->Launch Settings that said -no-window for the emulator. MotoDev must have set that. That had to be it. I got rid of it and still no Emulator. So I got rid of Eclipse, the SDK, everything and did a full fresh install of everything. Still no emulator window. I can start the emulator with an AVD from the command line fine and I see it. But from Eclipse, nada.
View 2 Replies View RelatedI am developing an ip phone an android.it may work as a service in background.when a call(or a message) coming in,I need a window(dialog or activity) popup.how to do that?
View 2 Replies View RelatedI can't find a way to obtain a reference the Window containing an arbitrary View v. I found getWindowToken, but I can't figure out how to use it? Does anyone know how? Also, does anyone know why it returns an IBinder rather than a Window?
View 1 Replies View RelatedIn android 1.5 release notes I saw Animated window transitions.
What is this all about ?
IN my application i want to show trasitions if i go from one activity to other.We can set the animation for both activities and call when one is closing and other is opening.
But problem is when , the current animation will stop when the onCreate of next activity is called ?
Means , when activity is pushed to stack , ongoing animation is stopped. Because of this we cannot show a smooth transition effect between activities.
I' trying to use window.pageYOffset & window.scrollMaxY to calculate the current page progress. This approach works under FF3.5 but under webkit window.scrollMaxY is undefined.
View 3 Replies View RelatedI am working on IM and i want to make Chat Window but i don't know how to start it. Currently I am using EditText field, a text view and a button, after entering text in EditText field on pressing send button i am getting text from EditText filed and appending it to TextView its looking good but there are some problems, and i don't know its right approach or not ?
View 6 Replies View RelatedCurrently I am working on chat messenger and I want to make chat window. any one can help me regarding this any use full link for this.
View 2 Replies View RelatedI want applications to check whether hardware supports touch, single touch or multitouch. Based on that applications should enable different behaviors.
View 2 Replies View RelatedHow do you get a reference to the window from outside of an Activity or from the context? Is it possible to access the window without having a reference to an activity?
View 1 Replies View RelatedI heard that, on Android, windows must be "flattened" before they can be rendered. This, "requires both CPU & GPU usage, not to mention that it's an incredibly expensive operation. To make it worse, this operation takes place on the main thread, meaning that you will experience lag. Now I must admit this happens less on smaller screens (I have a large screen), and it also happens less on apps where the developers have optimized their scrolling to the max. This is definitely not something easy to do."
Two questions:
1. What does this mean?
2. Is it true? (For both regular Android and Cyanogenmod)
BTW, it was on a debate between iOS vs. Android.
In one of my activities, I use the Theme.Dialog style, and I can't get the window to launch at full size.why does that not work? I also tried setting the size in pixels, but that has no effect whatsoever.
View 6 Replies View RelatedI've created a set of preference screens building on the tuts on androidguys. My preference XML contains nested PreferenceScreens. The below doesn't occur in the root screen, only once clicking to a child PreferenceScreen. Once in that PreferenceScreen, even before selecting an EditPreference, if I change orientation (i.e. flick the G1 keyboard out) I get an error: 01-30 09:33:54.080: ERROR/WindowManager(1261): android.view.WindowLeaked: that was originally added here.I have previously overcome this in other activities by utilising the onPause etc methods with custom dialogs I use. How can I prevent this in the PreferenceActivity? What am I missing?
View 17 Replies View RelatedHow can you put text in the status bar to stay there when the window is not expanded? kinda like using text instead of an icon?
View 1 Replies View RelatedI have an Activity which has no window (but it has a view). I'm using: getWindowManager().addView(view, params);I've attempted to call takeKeyEvents(true), however I see that takeKeyEvents first retrieves the Window and then calls takeKeyEvents on that Window.In my case, the Window is null.What this means is that I never receive onKeyUp and onKeyDown calls, which I need in order to intercept some key presses from external input devices (similar to a handsfree set for example).
View 10 Replies View RelatedI'd like to ask about how to proper handle progress Dialog in Thread, since getting the error from subject. My code...
View 2 Replies View RelatedWhen I was using Hierarchy Viewer to check views of basic emulator, there was no problem and I can normally find all views in the emulator. But when I was using real device ( HTC Nexus one ), I couldn't see focus window in the Hierarchy Viewer. Do you have any idea for these issues?
View 6 Replies View RelatedLet's say in my example I am working with SurfaceView for my CameraSurfaceView. I have a few questions, hope you can help me.
1. When this SurfaceView gets created (I assume via final CameraSurfaceView cameraView = new CameraSurfaceView (getApplicationContext()), this will result in a call createSurface() in SurfaceFlinger with format, width and height. Am I correct?
Is this SurfaceView also my UI window if I want to draw anything? I thought if I call setType(PUSH_BUFFER) on this surface, I won't be able to do any drawing on this surface.
2. How does the application pass these information like format, width and height to SurfaceFlinger for the allocation? Is it by using .setFormat, .setFixedSize?
3. How do they methods .setFormat, .setFixedSize related to the surfaceHolder.surfaceChanged() callback?
I have a string called string3 that I want to read into a EditText window called editTextW. I am trying to use:editTextW.setText(getString(string3)); but set text doesn't seem to like strings. Does anyone have any suggestions of what I can use to get the string in to my EditText window?
View 8 Replies View RelatedI am doing small project "Location Finder" in android.In that i have used different menu items,which include Close menu.On click of that menu i want to close the application.i have tried it with finish(),but it just the finish the current activity.
View 3 Replies View RelatedI am wanting to simulate the look of the "recent applications" display that you get when you long press the home key. At first I thought it was a custom dialog but apparently (according to what I see in the Hierarchy viewer) it is a PhoneWindow$DecorView. I presume the DecorView is the main layout for this. According to the docs there is no layout or window named this, so I can not extend from it.
View 4 Replies View RelatedWhat's the best way to check if the view is visible on the window?
I have a CustomView which is part of my SDK and anybody can add CustomView to their layouts. My CustomView is taking some actions when it is visible to the user periodically. So if view becomes invisible to the user then it needs to stop the timer and when it becomes visible again it should restart its course.
But unfortunately there is no certain way of checking if my CustomView becomes visible or invisible to the user. There are few things that I can check and listen to: onVisibilityChange, it is for view's visibility change, and is introduced in new API 8 version so has backward compatibility issue onWindowVisibilityChange, but my CustomView can be part of a ViewFlipper's Views so it can pose issues onDetachedFromWindows, this not as useful onWindowFocusChanged //Again my CustomView can be part of ViewFlipper's views. So if anybody has faced this kind of issues please throw some light.
I am having some of the following exceptions:
CODE:................
I have googled it and see that it has something to do with popups and turning the screen, but there is no reference to my code.
The questions are:
Is there a way to find out exactly when this issue is happening? other than turning the screen, is there another event or action that triggers this error? how do I prevent this to happen?
As you know,i started the monkey tool at adb shell,and run a script file to send a series of commands including key and mouse events,But sadly to see that when i close the adb DOS window,Monkey just terminates, I wonder why should this happen,and Will it do the same to a real device ?
View 5 Replies View Related