[android-developers] Re: Layout help

2011-03-30 Thread Neilz
Ok, I'll try again - it was a Sunday after all :-) Basically all I'm after is a LinearLayout sitting in the center of the screen, that I can scroll horizontally from one item to the next, using a finger scroll, rather than just buttons. Any help with this really appreciated. -- You received th

[android-developers] Re: Layout help for WebView

2010-10-19 Thread Neilz
Strangely, that worked, I really didn't think it would ;-) Thanks! On Oct 19, 7:29 pm, TreKing wrote: > On Tue, Oct 19, 2010 at 9:25 AM, Neilz wrote: > > How can I keep the button area fixed in height, while the webview scrolls > > if the text is long enough? > > First, I'd get rid of the "wrap

[android-developers] Re: Layout help - limiting dialog size

2010-11-14 Thread Neilz
WebView has its own Scrolling. I tried it already, and it made no difference to the overall layout problem! On Nov 14, 6:43 pm, Marcin Orlowski wrote: > On 14 November 2010 17:26, Neilz wrote: > > > Hi all. I have a custom dialog, which contains a WebView. If the > > content of the webview is to

[android-developers] Re: Layout help - limiting dialog size

2010-11-15 Thread Neilz
Ok, I'm hoping for some luck with the Monday daytime crowd... I can't resolve this. I'm even trying to get hold of the height of the Dialog after it's been drawn, but all I get is -1 or 0: LinearLayout frame = (LinearLayout) layout.findViewById(R.id.dialog_root); Log.e("Tag", "HEIGHT " + frame.ge

[android-developers] Re: Layout help - limiting dialog size

2010-11-15 Thread niko20
DisplayMetrics dm = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(dm); ScreenWidth = dm.widthPixels; ScreenHeight = dm.heightPixels; And then set your main view's height and width to match those values. -nik

[android-developers] Re: Layout help - limiting dialog size

2010-11-15 Thread Pent
Here's a dialog I have with a webview top and a button row bottom. In general I've found dialogs to be a total pain to layout. Pent http://schemas.android.com/apk/res/android"; android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="ver

[android-developers] Re: Layout help - limiting dialog size

2010-11-15 Thread Neilz
Nico, the problem here is that I want the dialog to wrap (shrink) where the text isn't that big. I simply can't get hold of the size of the dialog once it's displayed, so I have no idea when to set what you show below. So the layout itself has to do the shrinking, but stay at a maximum height where

[android-developers] Re: Layout help - limiting dialog size

2010-11-15 Thread Pent
> I'd consider going android:layout_height="0px" on the WebView. I'm not > sure what wrap_content means in this context, particularly if the > content is long. Yes, that's the usual combo, and works here too. Most of my dialog layouts are the result of 30 rounds of 'maybe this wiill work' tweakin

[android-developers] Re: Layout help - limiting dialog size

2010-11-15 Thread Neilz
Pent... your layout did the trick for me. Strange thing is, I can't really understand why yours works and mine doesn't... that's android for you I guess! Thanks :-) Oh, and this time for once, layout_height="0px"; didn't work. It actually made it zero height. On Nov 15, 5:15 pm, Pent wrote: > H

[android-developers] Re: Layout help - limiting dialog size

2010-11-28 Thread Jithin
dialog.getWindow().getAttributes() It will a WindowManager.LayoutParams lp; set lp.x,lp.y,lp.height,lp.weight and lp.gravity dialog.getWindow().setAttributes(lp) Try this You can adjust dialog sie and position using this On Nov 16, 2:04 am, Neilz wrote: > Pent... your layout did

Re: [android-developers] Re: Layout help - limiting dialog size

2010-11-15 Thread Mark Murphy
I'd consider going android:layout_height="0px" on the WebView. I'm not sure what wrap_content means in this context, particularly if the content is long. On Mon, Nov 15, 2010 at 12:15 PM, Pent wrote: > Here's a dialog I have with a webview top and a button row bottom. > > In general I've found di