技术开发 频道

Android onKeyDown与Layout坐标交互

  169 if(intButtonX>(intScreenX-intWidth))

  170 {

  171 intButtonX = intScreenX-intWidth;

  172 }

  173 mButton01.setLayoutParams

  174 (

  175 new AbsoluteLayout.LayoutParams

  176 (intWidth,intHeight,intButtonX,intButtonY)

  177 );

  178 }

  179

  180 //显示信息

  181 public void mMakeTextToast(String str, boolean isLong)

  182 {

  183 if(isLong==true)

  184 {

  185 Toast.makeText(EX05_20.this, str, Toast.LENGTH_LONG).show();

  186 }

  187 else

  188 {

  189 Toast.makeText(EX05_20.this, str, Toast.LENGTH_SHORT).show();

  190 }

  191 }

  192}

0
相关文章