当前位置: 首页>>代码示例>>Java>>正文


Java AbsoluteLayout类代码示例

本文整理汇总了Java中android.widget.AbsoluteLayout的典型用法代码示例。如果您正苦于以下问题:Java AbsoluteLayout类的具体用法?Java AbsoluteLayout怎么用?Java AbsoluteLayout使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AbsoluteLayout类属于android.widget包,在下文中一共展示了AbsoluteLayout类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: GoogleMobileAds_RemoveBanner

import android.widget.AbsoluteLayout; //导入依赖的package包/类
public void GoogleMobileAds_RemoveBanner()
{
	if( adView != null )
	{
		RunnerActivity.ViewHandler.post( new Runnable() {
		public void run() 
	    {
			AbsoluteLayout layout = (AbsoluteLayout)RunnerActivity.CurrentActivity.findViewById(R.id.ad);
			ViewGroup vg = (ViewGroup)layout;
			if(vg!=null)
			{
				vg.removeView( adView );
			}
			adView.destroy();
			adView = null;
			
	    }});
	}
}
 
开发者ID:Magicrafter13,项目名称:1946,代码行数:20,代码来源:GooglePlayServicesExtension.java

示例2: GoogleMobileAds_MoveBanner

import android.widget.AbsoluteLayout; //导入依赖的package包/类
public void GoogleMobileAds_MoveBanner( double _x, double _y )
{
	Log.i("yoyo", "MoveBanner:" + _x + "," + _y);
	final int x = (int)_x;
	final int y = (int)_y;
	BannerXPos = x;
	BannerYPos = y;

	if( adView != null )
	{
		RunnerActivity.ViewHandler.post( new Runnable() {
		public void run()
		{
			if( x < 0 || y < 0) {
				adView.setVisibility(View.INVISIBLE);
			}
			else
			{
				AbsoluteLayout.LayoutParams params = new AbsoluteLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, x,y );
				adView.setLayoutParams( params);
				adView.requestLayout();
				adView.setVisibility(View.VISIBLE);
			}
		}});
	}
}
 
开发者ID:Magicrafter13,项目名称:1946,代码行数:27,代码来源:GooglePlayServicesExtension.java

示例3: getTouchView

import android.widget.AbsoluteLayout; //导入依赖的package包/类
private View getTouchView(int x, int y) {
    View v = null;
    AbsoluteLayout.LayoutParams MinParam = null;
    for (int i = 0; i < absoluteLayout.getChildCount(); i++) {
        View view = absoluteLayout.getChildAt(i);

        AbsoluteLayout.LayoutParams param = (AbsoluteLayout.LayoutParams) view.getLayoutParams();
        if (x >= param.x && x <= (param.x + param.width))
            if (y >= param.y && y <= (param.y + param.height)) {
                if (v == null || (MinParam.height * MinParam.width > param.width * param.height)) {
                    v = view;
                    MinParam = param;
                }
            }
    }
    return v;
}
 
开发者ID:w568w,项目名称:fuckView,代码行数:18,代码来源:FullScreenPopupWindow.java

示例4: run

import android.widget.AbsoluteLayout; //导入依赖的package包/类
@Override
public void run() {
    AbsoluteLayout.LayoutParams params = new AbsoluteLayout.LayoutParams(
            w, h + HEIGHT_PADDING, x, y);

    if (mTextEdit == null) {
        mTextEdit = new DummyEdit(getContext());

        mLayout.addView(mTextEdit, params);
    } else {
        mTextEdit.setLayoutParams(params);
    }

    mTextEdit.setVisibility(View.VISIBLE);
    mTextEdit.requestFocus();

    InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.showSoftInput(mTextEdit, 0);
}
 
开发者ID:stephen47,项目名称:android-sdl2-gradle-template,代码行数:20,代码来源:SDLActivity.java

示例5: addViewToParentAdAPI

import android.widget.AbsoluteLayout; //导入依赖的package包/类
public final void addViewToParentAdAPI() {
	if(parent != null){
		final View containerView = parent.getContainerViewAdAPI();
		
		if(containerView != null){
			if(containerView instanceof AbsoluteLayout){
				AndroidUIUtil.removeFromParent(peer);
				AbsoluteLayout vg = (AbsoluteLayout)containerView;
				
//					LogManager.log("AbsoluteLayout addView for " + this.toString());
				final Border border = (parent instanceof JComponent)?((JComponent)parent).getBorder():null;
				final Insets insets = (border != null)?border.getBorderInsets(parent):null;
				vg.addView(peer, new AbsoluteLayout.LayoutParams(width, height, x - ((insets != null)?insets.left:0), y - ((insets != null)?insets.top:0)));
			}else if(containerView instanceof HCTabHost){
				//view已加入,不用处理
			}
		}
	}
}
 
开发者ID:javalovercn,项目名称:j2se_for_android,代码行数:20,代码来源:Component.java

示例6: updateBubbleSize

import android.widget.AbsoluteLayout; //导入依赖的package包/类
private void updateBubbleSize() {
    int oldWidth = mBubbleWidth;
    int oldHeight = mBubbleHeight;
    mBubbleWidth = (int) Math.max(mBubbleMinWidth,
            Integer.toString(mEnd).length() * mCharWidth + LayoutUtils.dp2pix(mContext, 8));
    mBubbleHeight = (int) Math.max(mBubbleMinHeight,
            mCharHeight + LayoutUtils.dp2pix(mContext, 8));

    if (oldWidth != mBubbleWidth && oldHeight != mBubbleHeight) {
        //noinspection deprecation
        AbsoluteLayout.LayoutParams lp = (AbsoluteLayout.LayoutParams) mBubble.getLayoutParams();
        lp.width = mBubbleWidth;
        lp.height = mBubbleHeight;
        mBubble.setLayoutParams(lp);
    }
}
 
开发者ID:seven332,项目名称:Nimingban,代码行数:17,代码来源:Slider.java

示例7: setTitle

import android.widget.AbsoluteLayout; //导入依赖的package包/类
/**
	 * 給菜單添加標題
	 * @param title
	 */
	public void setTitle(CharSequence title) {
		if (mListTitle[0] == null || mListTitle[1] == null) {
			return;
		}

		mListTitle[0].setText(title);
		mListTitle[0].setTextScaleX(0.5f);
		mListTitle[0].setTextSize(mTextSize);
		mListTitle[0].setTextColor(mTextColor);
//		mListTitle[0].setBackgroundResource(R.drawable.popup_list);
		mListTitle[0].setLayoutParams(new AbsoluteLayout.LayoutParams(m_cur_width, mListTitleHeight, m_cur_lx, m_cur_ly - mListTitleHeight));

		mListTitle[1].setText(title);
		mListTitle[1].setTextScaleX(0.5f);
		mListTitle[1].setTextSize(mTextSize);
		mListTitle[1].setTextColor(mTextColor);
//		mListTitle[1].setBackgroundResource(R.drawable.popup_list);
		mListTitle[1].setLayoutParams(new AbsoluteLayout.LayoutParams(m_cur_width, mListTitleHeight, m_cur_rx, m_cur_ry - mListTitleHeight));

	}
 
开发者ID:hubert1002,项目名称:WiCamera3D,代码行数:25,代码来源:CSMenu.java

示例8: ViewHolder

import android.widget.AbsoluteLayout; //导入依赖的package包/类
public ViewHolder() {
	m_listItem_layout = new AbsoluteLayout(CSShareMenu.this.m_context);
	m_lLayout = new LinearLayout(CSShareMenu.this.m_context);
	m_appName = new TextView(CSShareMenu.this.m_context);
	m_icon = new ImageView(CSShareMenu.this.m_context);
	m_icon.setLayoutParams(new LinearLayout.LayoutParams(m_image_width,
			m_image_height));
	m_appName.setTextSize(22);
	m_appName.setTextScaleX(0.5f);
	m_lLayout.setGravity(Gravity.CENTER_VERTICAL);
	m_lLayout.addView(m_icon);
	m_lLayout.addView(m_appName);
	m_lLayout.setLayoutParams(new AbsoluteLayout.LayoutParams(m_shareMenu_width, LayoutParams.WRAP_CONTENT, 0, 0));
	m_lLayout.setBackgroundResource(mListLayoutSelector);
	m_listItem_layout.addView(m_lLayout);
}
 
开发者ID:hubert1002,项目名称:WiCamera3D,代码行数:17,代码来源:CSShareMenu.java

示例9: addToLayout

import android.widget.AbsoluteLayout; //导入依赖的package包/类
@Override
public void addToLayout(ViewGroup layout) {
	// TODO Auto-generated method stub
	if(mToggleButtons[0] == null || mToggleButtons[1] == null){
		return;
	}
	
	if(m_is_3D){

	if(m_cur_width == WRAP_CONTENT || m_cur_height == WRAP_CONTENT){
		mToggleButtons[0].setLayoutParams(new AbsoluteLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, m_cur_lx, m_cur_ly));
		mToggleButtons[1].setLayoutParams(new AbsoluteLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, m_cur_rx, m_cur_ry));
	}else{
		mToggleButtons[0].setLayoutParams(new AbsoluteLayout.LayoutParams(m_cur_width, m_cur_height, m_cur_lx, m_cur_ly));
		mToggleButtons[1].setLayoutParams(new AbsoluteLayout.LayoutParams(m_cur_width, m_cur_height, m_cur_rx, m_cur_ry));
	}
	}
	layout.addView(mToggleButtons[0]);
	layout.addView(mToggleButtons[1]);
	
}
 
开发者ID:hubert1002,项目名称:WiCamera3D,代码行数:22,代码来源:CSToggleButton.java

示例10: setLocation

import android.widget.AbsoluteLayout; //导入依赖的package包/类
/**
 * 設置控件的位置
 */
@Override
public void setLocation(int x, int y) {
	super.setLocation(x, y);
	if(mToggleButtons[0] == null || mToggleButtons[1] == null){
		return;
	}
	
	if(mToggleButtons[0].getLayoutParams() != null && mToggleButtons[1].getLayoutParams() != null){
		if(m_cur_width == WRAP_CONTENT || m_cur_height == WRAP_CONTENT){
			mToggleButtons[0].setLayoutParams(new AbsoluteLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, m_cur_lx, m_cur_ly));
			mToggleButtons[1].setLayoutParams(new AbsoluteLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, m_cur_rx, m_cur_ry));
		}else{
			mToggleButtons[0].setLayoutParams(new AbsoluteLayout.LayoutParams(m_cur_width, m_cur_height, m_cur_lx, m_cur_ly));
			mToggleButtons[1].setLayoutParams(new AbsoluteLayout.LayoutParams(m_cur_width, m_cur_height, m_cur_rx, m_cur_ry));
		}
		mToggleButtons[0].requestLayout();
		mToggleButtons[1].requestLayout();
	}
}
 
开发者ID:hubert1002,项目名称:WiCamera3D,代码行数:23,代码来源:CSToggleButton.java

示例11: setLocation

import android.widget.AbsoluteLayout; //导入依赖的package包/类
@SuppressWarnings("deprecation")
@Override
public void setLocation(int x, int y) {
	super.setLocation(x, y);
	if(m_seekBars[0] == null || m_seekBars[1] == null){
		return;
	}
	
	if(m_seekBars[0].getLayoutParams() != null && m_seekBars[1].getLayoutParams() != null){
		if(m_cur_width == WRAP_CONTENT || m_cur_height == WRAP_CONTENT){
			m_seekBars[0].setLayoutParams(new AbsoluteLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, m_cur_lx, m_cur_ly));
			m_seekBars[1].setLayoutParams(new AbsoluteLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, m_cur_rx, m_cur_ry));
		}else{
			m_seekBars[0].setLayoutParams(new AbsoluteLayout.LayoutParams(m_cur_width, m_cur_height, m_cur_lx, m_cur_ly));
			m_seekBars[1].setLayoutParams(new AbsoluteLayout.LayoutParams(m_cur_width, m_cur_height, m_cur_rx, m_cur_ry));
		}
		m_seekBars[0].requestLayout();
		m_seekBars[1].requestLayout();
	}
}
 
开发者ID:hubert1002,项目名称:WiCamera3D,代码行数:21,代码来源:CSSeekBar.java

示例12: setLocation

import android.widget.AbsoluteLayout; //导入依赖的package包/类
@SuppressWarnings("deprecation")
@Override
public void setLocation(int x, int y) {
	super.setLocation(x, y);
	if(m_radioButtons[0] == null || m_radioButtons[1] == null){
		return;
	}
	if(m_radioButtons[0].getLayoutParams() != null && m_radioButtons[1].getLayoutParams() != null){
		if(m_cur_width == WRAP_CONTENT || m_cur_height == WRAP_CONTENT){
			m_radioButtons[0].setLayoutParams(new AbsoluteLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, m_cur_lx, m_cur_ly));
			m_radioButtons[1].setLayoutParams(new AbsoluteLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, m_cur_rx, m_cur_ry));
		}else{
			m_radioButtons[0].setLayoutParams(new AbsoluteLayout.LayoutParams(m_cur_width, m_cur_height, m_cur_lx, m_cur_ly));
			m_radioButtons[1].setLayoutParams(new AbsoluteLayout.LayoutParams(m_cur_width, m_cur_height, m_cur_rx, m_cur_ry));
		}
		m_radioButtons[0].requestLayout();
		m_radioButtons[1].requestLayout();
	}
}
 
开发者ID:hubert1002,项目名称:WiCamera3D,代码行数:20,代码来源:CSRadioButton.java

示例13: setDimension

import android.widget.AbsoluteLayout; //导入依赖的package包/类
@Override
public void setDimension(boolean is3d) {
	super.setDimension(is3d);
	if(m_imageviews[0] == null || m_imageviews[1] == null){
		return;
	}
	
	if(m_imageviews[0].getLayoutParams() != null && m_imageviews[1].getLayoutParams() != null){
		if(m_cur_width == WRAP_CONTENT || m_cur_height == WRAP_CONTENT){
			m_imageviews[0].setLayoutParams(new AbsoluteLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, m_cur_lx, m_cur_ly));
			m_imageviews[1].setLayoutParams(new AbsoluteLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, m_cur_rx, m_cur_ry));
		}else{
			m_imageviews[0].setLayoutParams(new AbsoluteLayout.LayoutParams(m_cur_width, m_cur_height, m_cur_lx, m_cur_ly));
			m_imageviews[1].setLayoutParams(new AbsoluteLayout.LayoutParams(m_cur_width, m_cur_height, m_cur_rx, m_cur_ry));
		}
		m_imageviews[0].requestLayout();
		m_imageviews[1].requestLayout();
	}
}
 
开发者ID:hubert1002,项目名称:WiCamera3D,代码行数:20,代码来源:CSImageView.java

示例14: setLocation

import android.widget.AbsoluteLayout; //导入依赖的package包/类
@Override
public void setLocation(int x, int y) {
	super.setLocation(x, y);
	if(m_imageviews[0] == null || m_imageviews[1] == null){
		return;
	}
	if(m_imageviews[0].getLayoutParams() != null && m_imageviews[1].getLayoutParams() != null){
		if(m_cur_width == WRAP_CONTENT || m_cur_height == WRAP_CONTENT){
			m_imageviews[0].setLayoutParams(new AbsoluteLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, m_cur_lx, m_cur_ly));
			m_imageviews[1].setLayoutParams(new AbsoluteLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, m_cur_rx, m_cur_ry));
		}else{
			m_imageviews[0].setLayoutParams(new AbsoluteLayout.LayoutParams(m_cur_width, m_cur_height, m_cur_lx, m_cur_ly));
			m_imageviews[1].setLayoutParams(new AbsoluteLayout.LayoutParams(m_cur_width, m_cur_height, m_cur_rx, m_cur_ry));
		}
		m_imageviews[0].requestLayout();
		m_imageviews[1].requestLayout();
	}
}
 
开发者ID:hubert1002,项目名称:WiCamera3D,代码行数:19,代码来源:CSImageView.java

示例15: addToLayout

import android.widget.AbsoluteLayout; //导入依赖的package包/类
@Override
public void addToLayout(ViewGroup alayout) {
	if(m_imageviews[0] == null || m_imageviews[1] == null){
		return;
	}

	if(alayout == null){
		return;
	}

	if(m_cur_width == WRAP_CONTENT || m_cur_height == WRAP_CONTENT){
		m_imageviews[0].setLayoutParams(new AbsoluteLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, m_cur_lx, m_cur_ly));
		m_imageviews[1].setLayoutParams(new AbsoluteLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, m_cur_rx, m_cur_ry));
	}else{
		m_imageviews[0].setLayoutParams(new AbsoluteLayout.LayoutParams(m_cur_width, m_cur_height, m_cur_lx, m_cur_ly));
		m_imageviews[1].setLayoutParams(new AbsoluteLayout.LayoutParams(m_cur_width, m_cur_height, m_cur_rx, m_cur_ry));
	}

	alayout.addView(m_imageviews[0]);
	alayout.addView(m_imageviews[1]);
}
 
开发者ID:hubert1002,项目名称:WiCamera3D,代码行数:22,代码来源:CSImageView.java


注:本文中的android.widget.AbsoluteLayout类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。