Android : PopupWindow - Want To Control Size?

May 27, 2010

I've experimented with a PopupWindow, but don't have a very good way of controlling its size. It only responds to absolute pixels.

Android : PopupWindow - Want to control size?


Android : Way To Control An App's Cache Size?

Aug 10, 2010

My app has a WebView which displays Google maps. I'm trying to limit the cache size to a reasonable one - like 2MB. After checking with settings->applications->manage applications I found out that regular page load gets the cache to 900kb. And dispite my efforts, I can't limit the cache size or monitor when the cache limit is being reached. If I'm playing with the map on the webview, the app can even reach 10MB and no "ache max size reached" message is received.

View 2 Replies View Related

Android :: Programmatically Control Size Of Child View In AbsoluteLayout

Feb 18, 2009

The documentation at http://code.google.com/android/reference/android/widget/AbsoluteLayout.html says:
onLayout(boolean changed, int l, int t, int r, int b) //Called from layout when this view should assign a size and position to each of its children. So I overrode it like this:

@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
Log.d("test", "In MainLayout.onLayout");
int childCount = getChildCount();
for (int childIndex = 0; childIndex < childCount; childIndex++) {
getChildAt(childIndex).setLayoutParams(new LayoutParams(100, 100, 100, 100));
}
super.onLayout(changed, l, t, r, b);
}

I am declaring the child elements (buttons) in the XML for the layout. This correctly sets the position of the buttons but not the size. The size is being taken from what is defined in the XML (it's a required attribute).

View 2 Replies View Related

Android :: Create ADT Virtual Machine Of Specific Size That Still Has Hardware Control Buttons

Aug 9, 2010

I'm trying to develop a very specific app for my Dell Streak. I want the entire app to run landscape. The Streak has a tilt function that switches the whole OS to a landscape 800x480.

So I want to make an ADT to test in that uses an 800x480 display, but whenever I set the size I get no buttons. The Streak has a Home, Menu and Back button aswell as volume/mute and power, and I need to use some of them for my application.

I'm not worried about the tilting messing up my application. Not yet, anyway. Just need the test environment the right size and with buttons.

View 1 Replies View Related

Android :: PopupWindow Does Not Show / Way To Fix?

Jul 14, 2010

I intend to show this as a dropdown just below the button that drops this down.

View 2 Replies View Related

Android :: Use GridView In PopupWindow?

Nov 10, 2009

I am having a similar issue while trying to use a GridView in a PopupWindow. On my Activity's onCreate method, I am inflating a gridview from xml as follows:

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

I would like this GridView to popup on a button click. Also inside of my activity's onCreate,

I have:

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

On button click, I am throwing a ClassCastException from GridView.onMeasure(int, int).

View 4 Replies View Related

Android :: AlertDialog Or PopupWindow ?

May 20, 2010

http://img139.imageshack.us/img139/1203/devicei.png

I've seen this in a few apps, and i have expiremented with both PopupWindow, and AlertDialog and I was confused which this was.

View 1 Replies View Related

Android :: PopupWindow Class Using V2.0?

Dec 28, 2009

I looked online and was not able to find a working example of the PopupWindow class. The code examples I found online either compile but do not work, or are using methods which have since been removed (such as Activity.getViewInflate()). Is there a simple working example that displays a PopupWindow?

View 3 Replies View Related

Android :: PopupWindow On Activity Start

Feb 21, 2010

I am trying to make a PopupWindow show straight away when an activity has started.

when calling public void showAtLocation (View parent, int gravity, int x, int y)

I get the exception ERROR/AndroidRuntime(2500): Caused by: android.view.WindowManager $BadTokenException: Unable to add window -- token null is not valid; is your activity running?

At the moment I am calling from onCreate, but when calling from onStart or onResume it still gives the same error.

The activity api says the activity is supposed to be running after onResume is called. Where is the best place to load up the PopupWindow if it needs to be done straight away?

At the moment It looks like Activity.onWindowFocusChanged() is the best place.

View 2 Replies View Related

Android :: PopupWindow To System Desk Or Other App?

Sep 17, 2010

How can i put my PopupWindow to system desk or other app? how can i use this permission:INTERNAL_SYSTEM_WINDOW

View 2 Replies View Related

Android : How Can I Add An Edit Text On A PopupWindow?

Nov 9, 2010

I put an editText on a PopupWindow and it's not working. It acts like a disabled edit text, clicking on the edit text won't show the soft keyboard. How can I add an edit text on a popupWindow?

View 2 Replies View Related

Android :: PopupWindow With Some Enter/exit Animations

Mar 1, 2009

i tried to use my popupWindow with some enter/exit animations - it has setAnimationStyle() method for that purpose. after some time i realized i cannot use my own custom animation styles which is ok but a bit limiting. so i tried system ones: R.style.Animation_Toast works ok, but R.style.Animation_Dialog doesn't. looking at xml definition files i found that Toast animation uses simple alpha animation and Dialog animation is a set of alpha combined wit scale animation. is it a problem for WindowManager to deal with complex animations?

View 3 Replies View Related

Android :: Cannot Execute OnItemClick For GridView In PopupWindow

Jan 21, 2010

I have a gridView that I display in a popupwindow (the gridview is in a transparent layout, which inherits from linearlayout and just has a partially transparent background). I can never get this GridView's OnItemClick to execute. When I touch an image in my gridview it appears to be clicked (image bachgrond changes), but OnItemClick is not being called.

Below is the code for my Adapter and my popupview containing the gridView.

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

View 2 Replies View Related

Android :: Can't Intercept The OnTouch Event Of PopupWindow

May 26, 2009

I want to intercept the OnTouch event in a PopupWindow, but it failes everytime. Here is the code snip:

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

When the activity started, I can click the button to show the popup window correctly. But after that, nothing happens when I touch the popup window's view. But if I touch any where outside the popup window, the log Log.d("Demo", "layout::onTouch >>> view: " + v + ", event: " + event); will work.

It looks like when I touch the view of the popup window, the touch event has been consumed somewhere?

View 2 Replies View Related

Android :: PopupWindow Can't Be Dismissed When Press Back Key

Jun 4, 2010

I've created a custom PopupWindow but when I press back button, the window doesn't dissapear.

View 3 Replies View Related

Android :: PopUpWindow Not Displaying When Tapping On Marker

Jun 18, 2010

I am displaying google map and on top of that some overlay items(Markers) are there. When tapping on the markers, I need to display PopUpWindow. The code is executing but popup is not displaying.

popUp.showAtLocation(layout, Gravity.TOP, 0, 0); popUp.setFocusable(true); popUp.setTouchable(true); popUp.setOutsideTouchable(false); popUp.update(0,50, 320, 70);

Here layout is an object of LinearLayout.

I created another android application, in that, I put the above code and its working perfectly. PopupWindow is displaying.

View 2 Replies View Related

Android :: Show Soft Keyboard On PopupWindow?

Oct 12, 2010

I am using PopupWindow class and on PopupWindow i have one EditText,my problem is that when PopupWindow is visible and i click on EditText at that time Soft Keyboard is not visible and i am not able to enter Input. So anybody tell me how to solve this problem?

View 2 Replies View Related

Android : Droid PopupWindow Blur / Dim Background?

Jul 11, 2010

I would like to be able to either blur or dim the background when I show my popupwindow using popup.showAtLocation, and unblur/dim the background when popup.dismiss is called.

I have tried applying layout params FLAG_BLUR_BEHIND and FLAG_DIM_BEHIND to my activity, and this appears to just blur and dim the background as soon my app is started.

View 1 Replies View Related

Android :: PopupWindow With GridView - Trouble With Inflating View

Nov 11, 2009

I am having an issue while trying to use a GridView in a PopupWindow. On my Activity's onCreate method, I am inflating a gridview from xml as follows:

CODE:.........

Would like this GridView to popup on a button click. Also inside of my activity's onCreate,

I have:

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

On button click, I am throwing a ClassCastException from GridView.onMeasure(int, int).

View 1 Replies View Related

Android :: How Do I Make My Image View Fixed Size Regardless Of Size Of Bitmap

Sep 23, 2010

So I'm loading images from a web service, but the size of the images are sometimes smaller or bigger than other images and the visualization looks silly when I put them in a ListView in android. I'd like to fix the size of my ImageView so that it only shows a portion of the image if it's larger than a preset amount. I've tried everything I can think of setting the setMaxWidth/setMaxHeight, setting the scale type to centerCrop, using ClipableDrawable wrapping my BitmapDrawable, setting using Drawable.setBounds(). I've tried setting in the XML and programmatically, but neither worked. I'm very surprised setting max width/height didn't do anything. Below is the XML I'm using ImageView definition in my layout file

View 1 Replies View Related

Android :: About Size Of Resource Assets Files & Final Apk Size

Oct 2, 2009

I am currently developing a dictionary application with voice database. I would like to know about the current Android limitation on the file size. I am using a self-provided sqlite database ( > 50mb ) . I tested that once the built .apk size exceeds ~30mb the app will not be installed onto the simulator (INSTALL_FAILED_ INSUFFICIENT _STORAGE). Could anyone confirm me that if up until now there is no way to embed such large size files in a single apk ( Aimed to sell at Google Market without requiring user to download datafile afterwards). Also, is there a limitation of 1,048,576 bytes for a single file in the assets folder ?

View 3 Replies View Related

Android :: Size Of Image Is Larger Than Or Smaller Than Specified Display Size

Jan 22, 2009

if size of image is larger than or smaller than specified display size (on screen), then it is automatically, compressed and stretched resp by android run time or require to handle by explicitly.

View 2 Replies View Related

Android :: Skin Size 800x600px - How To Setup An Emulator With This Size

May 7, 2009

Hi,

I would like to see how my app works on a 800x600 android netbook. how can i setup an emulator with this size?

thanks chris

View 4 Replies View Related

Android :: Check Cache Size For Bitmaps / Fix Maximum Size Of It?

Jun 30, 2010

I manage a cache of bitmap. Do you have an advise to fix the maximum size of it?

View 2 Replies View Related

Android :: Installed Application Size Vs APK File Size

Jul 8, 2010

Can somebody explain to me what makes up the installed application size? I have an apk that is about 8 MB, and often when I install I get the INSUFFICIENT_STORAGE error. I have around 25-30 MB free space on the phone. I'm doing debugging so I have to upload lots of new versions. If I uninstall the previous version then I can install the new version. The application manager claims that the app is taking up 22 MB. So back to the original question, how come the app is taking up 22 MB when it really only is 8 MB?

View 7 Replies View Related

Android :: Shared Library So Size Versus Apk Size

Sep 14, 2010

I would like to know why the size of my shared library .so is bigger than my .apk file generated with Eclipse? Approximatly the so size is twice the apk one. What is strange is after having installed it in the device (2.1 firmware) I checked the size of the apk when I uninstalled it from the device and surprisingly the apk size indicated is bigger even than the .so one. Is there any explaination of that?

View 2 Replies View Related

Android :: Android Custom PopupWindow - Dialog

May 5, 2010

I'm trying to get a completely custom Dialog or PopupWindow, without any of the default Android UI controls (title, background, buttons, whatever).

Is this possible at all? I've spent hours searching for this, but no luck... It seems like this should be easily possible, but I can't find it.

Preferably this would be by inflating a View from XML, but at this point anything that would just work would be nice.

View 4 Replies View Related

Android :: PopupWindow.showAtLocation - AnchorView - How To Get The Whole Screen As A AnchorView?

Oct 7, 2010

I have PopupWindow, which I'd like to place in the center of the screen. However, I only have access to the KeyboardView (since I'm implementing an IME) at the bottom of the screen and whenever I center my PopupWindow by using the KeyboardView and Gravity.CENTER it is of course only centered above the keyboard, but not in the whole screen. Is there a way to get the whole screen as an anchor view?

View 1 Replies View Related

Android :: Png Downloaded Size Different To Server Size?

Oct 7, 2010

My app downloads .png files to the sd card for later use. I kept getting OutOfMemoryErrors (if anyone could explain this too, that'd be great!) and so I took a look at the sizes of the images saved to the sd card, and they seem to be roughly double what they are on the server. Why is this, and how can I make them smaller?
public void onCreate(Bundle saved)
setContentView(R.layout.namedrxnscreen);
TextView t1 = (TextView)findViewById(R.id.rxn_text1);
TextView t2 = (TextView)findViewById(R.id.rxn_text2);
TextView t3 = (TextView)findViewById(R.id.rxn_text3);
TextView t4 = (TextView)findViewById(R.id.rxn_text4);
iv = (ImageView) findViewById(R.id.rxn_image);
pb = (ProgressBar) findViewById(R.id.rxn_loading);
vs = (ViewSwitcher) findViewById(R.id.rxn_switch);

View 1 Replies View Related

General :: How To Fit Button Size With Screen Size

Dec 19, 2012

I am programming an app using an absolute layout (@ eclipse). How to fit the button size with the screen size? (I have four buttons per row).

View 1 Replies View Related







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