is it possible to set dynamically(from code) width and height of gridview, if so what r methods. I want to keep my gridview changeable at run time in width and height. ( if this is not available; Is there any other solution?
I have a horizontal LinearLayout and in it I have EditText and Spinner elements. Which attributes I need to adjust so I would get proportional widths: I want EditText to take 3/5 and Spinner - 2/5 of all available width?
My code looks like this:
I tried setting android:layout_weight, but somehow it does not look "stable" enough for me - when EditText has no text - everything looks fine, but as soon as I start entering text into it - it starts expanding and Spinner shrinking accordingly...
I want the second ImageView to have the very same size of the first ImageView so that it resizes the pictures I set in the second view (header_avatar) to the same of the first view (@drawable/icon). Is this possible or do I have to do it programmatically? Cannot I reference the first view's width and length on the second view?
What happens to the width and height params declared in LayoutParams on configuration change? E.g. if I have an ImageView declared with, new LinearLayout.LayoutParams(30, 40); On Configuration Change, does the width become 40 and height 30?
Can you please tell me how can i set the width and height of an ImageView programmically in java code (not layout xml file)? I tried setMinimumWidth/setMinimumHeight, but that does not work. I have looked at the view in HierarchyView, it still said the width to be 80 and height to be 100. And that is not the value I set.
I am working on layout in android XML in which I would like to set a buttons height to match it's width when setup to fill parent. Obviously this number will change based on screen size, so I cannot use a set pixel size. Can someone help me with getting the button width based on screen size and then passing that to the height setting?
I have a problem creating a custom view for an Android application. My custom view wants to use if permitted the maximum screen width. I couldn't find any way to retrieve this value. Can anybody point me to the right method?
One of our views has a ScrollView as its root layout. When the device is rotated and onConfigurationChanged() is called, we'd like to be able to get the ScrollView's new width/height. Our code looks like this...
I have a task to parse thumbnail images and to set it on grid view,where url image content to be in different height and width(some images to be 60*60, or 110*80),how can i set images in grid have uniform height and width.