Invoke GlobalActions dialog (Shutdown/Reboot...) on Android-x86

by Christian Erpelding » Fri, 23 Apr 2010 20:55:37 GMT


Sponsored Links
 Hello,

I'm trying to port Android to the OpenFrame/Joggler.
 http://www.openpeak.com/OpenFrame.php 

The problem is that this device is touch-only, i.e. it has no hardware 
buttons at all. Not even a power button.

I'd like to be able to shutdown Android in a safe way to avoid data 
loss. :-)

Android-x86.org offers a touch-only feature that can be 
started/stopped by tapping the right corner of the StatusBar.
It can simulate HOME/MENU/BACK, implemented in 
frameworks/base/services/java/com/android/server/status/TouchFeature.java

I'd like to implement a function to show the Power Off dialog that's 
normally invoked by pressing the Power button on the PC (or 
longpressing the ENDCALL key on the phone).

After reading 



Other Threads

1. How to use WebView in Offline mode? Can I dynamically revoke permissions?

Hi,

I am want to use JavaScript to process some HTML pages in the background.

WebView seems to be a great basis to do this. There is one issue though. I
don't want to display the web page and its images/stylesheets right away, so
it is a waste of bandwidth when the stylesheets and images are downloaded. I
am wondering how to tell WebView not to do that.

I tried WebSettings.setLoadsImagesAutomatically(false), but this still loads
the stylesheets. WebView.setNetworkAvailable(false) is more an information
for WebView than a switch. Overriding
WebViewClient.shouldOverrideUrlLoading(..) didn't work either.

Any idea how to do this?

One thing that works is not giving the app the required Internet permission.
Unfortunately it is not that simple, because at other times I want to
display the processed pages and then it should download the
images/stylesheets ;-( But still is there some way that I can use this
permission thing? Can I dynamically revoke the permission? For a single
thread or process?

Cheers,

Mariano

-- 

2. Using Selector to change ImageButton's background while keeping the content image

Hi there,

I am currently trying to customize ImageButton to show different
draweables as background of the Button while keeping
the image set via the src attribute.

That's my custom_button.xml:

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
     <item android:state_pressed="true"
           android:drawable="@drawable/round_list_item" /> <!--
pressed -->
     <item android:state_focused="true"
           android:drawable="@drawable/round_list_item" /> <!--
focused -->
     <item android:drawable="@drawable/transparent" /> <!-- default --
</selector>

And this is the actual definition of the ImageButton:
<ImageButton android:background="@drawable/custom_button"
android:src="@drawable/attach_icon" android:id="@+id/test_button"
android:layout_height="35dip" android:layout_width="35dip"></
ImageButton>

Unfortunately all I get is the background from the selector xml
(whichs is btw working as expected) but not the image I have set via
the src attribute.
So basically all I want is to replace the standard state background
drawables while keeping the ability to set a foreground/content image.

Am I doing something wrong here?

Greetings,

maui

-- 

3. Defining an XML vertical line drawable

4. Spica v.LK2.02 - Root, Recovery, Apps2SD, Busybox, Wifi tether etc [04/15/2010]

5. Memory question

6. Icons for submenu items doesn't show up

7. Incorrect Coordinates From getLocationOnScreen/getLocationInWindow