android.widget.AbsoluteLayout.LayoutParams Java Examples
The following examples show how to use
android.widget.AbsoluteLayout.LayoutParams.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProgressWebView.java From letv with Apache License 2.0 | 5 votes |
public ProgressWebView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); this.progressbar = new ProgressBar(context, null, 16842872); this.progressbar.setLayoutParams(new LayoutParams(-1, Util.dip2px(context, 3.0f), 0, 0)); this.progressbar.setProgressDrawable(context.getResources().getDrawable(R.drawable.webview_loading_progress_style)); addView(this.progressbar); setWebChromeClient(new WebChromeClient(this)); }
Example #2
Source File: ProgressWebView.java From letv with Apache License 2.0 | 5 votes |
protected void onScrollChanged(int l, int t, int oldl, int oldt) { LayoutParams lp = (LayoutParams) this.progressbar.getLayoutParams(); lp.x = l; lp.y = t; this.progressbar.setLayoutParams(lp); super.onScrollChanged(l, t, oldl, oldt); }