How to implement onMeasure() for my custom widget

by silverburgh » Wed, 17 Feb 2010 02:47:34 GMT

Sponsored Links

I am trying to implement my own custom widget, but I am not sure how
to implement the onMeasure() for my custom Widget.

protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {

I want to put my custom widget in a linear layout, so that myWidget's
width can fill up the rest of the linear layout after the android
widget on the same LinearLayout :

<LinearLayout xmlns:android="" ;
        xmlns:app="" ;
    <Button android:id="@+id/buttonA"
    android:text="@string/buttonA" />

            app:text="Red some more text and more text etc etc"/>

  <ImageView android:id="@+id/icon"
                android:src="@drawable/icon" />



Other Threads

1. [WTShare] How to fix download & installation unsuccessful Android Market issues

How to fix download & installation
unsuccessful Android Market issues

The solution in one sentence: it most likely the .android_secure folder in
the root of your memory card that causing the Market errors, where Android
2.2 and above stores all apps installed to the SD card deleting it and
starting over might solve the issues. A more detailed explanation and other
popular solutions below.

You can also try this:

*Go to Settings > Applications > Manage applications on your device and
locate the Market in the list of installed applications. Tap on
it, and clear both its data and cache from the resulting screen.

*Put your phone in Airplane mode, turn on the radios again and then try to
download apps from the Market.

*Try to download applications over Wi-Fi instead of over 3G, and vice versa.

*Make sure your phone recognizes your SD card.
Try turning off your device, taking out the memory card and putting it back
in. Then check with a file manager on your phone that the SD card in fact
can be accessed properly.

*For some people, going to Settings > Applications > Manage applications,
locating the Market in the list of apps and then tapping
the button that says Uninstall updates seem to work.

Why the .android_secure folder might be to blame???

Two common Android error messages that have managed to drive many
increasingly frustrated
users loco are ownload unsuccessfuland nstallation unsuccessfulwhen
trying to
download apps from the Market.

These Market issues are even worse than the familiar hone storage is
getting lowmessage,
since there is no obvious way to solve the problem. The Market errors are
especially common on phones running Android 2.2 Froyo
or above, and for people who use the setInstallLocation 2 trick, or A2SD+
that lets all apps be installed to a partition on the SD card.

That because it most likely the folder .android_secure in the root of
your memory card that is causing the unsuccessful Market
downloads and installations. This is the folder where Android 2.2 stores all
apps that you e installed to the SD card. If the folder is corrupted
somehow, or the Market gets confused by it for
one reason or another, you won  be able to download or install apps.

The solution is to delete the .android_secure folder and let Android
recreate it. If you have a
rooted device and use A2SD+, make sure you move all apps to the internal
memory (which
with A2SD+ in fact is a partition of the SD card) before deleting the
folder. You can do this from
Settings > Applications > Manage
applications > On SD card . If you don use A2SD+, move as many apps that
can fit on your internal storage, uninstall the rest and reinstall them
after deleting the .android_secure folder.

If you want to do a full-on {*filter*} on this problem, a hard-reset is
recommended as well. That  what I did. This method usually solves the
Market download/installation unsuccessful issue hopefully it will do the
trick for you as well. Let
me know how it goes.

Credit to : techcredo

Pays ROM v2.2 with hTC Sense UI
Android 2.10.405.2 Release Key
Bravo Data++ AlphaRev S-OFF


2. [WTA] Evo, Restore ke Official

Yahh, mau coba download yg MIUI malah ga bisa :(

2010/11/27 Petra Immanuel <>


Petra Immanuel


3. Adding a user to a new group

4. Install Android Market di Emulator

5. How to make such a customized component

6. [WTA] Restore ke Official

7. How to allow for devices without a touchscreen android.hardware.touchscreen