码迷,mamicode.com
首页 >  
搜索关键字:layoutparams    ( 276个结果
android.widget.FrameLayout$LayoutParams cannot be cast to android.widget.LinearLayout$LayoutParams
http://blog.csdn.net/lilu_leo/article/details/11952717 有时候需要在在代码中设置LayoutParams,自己为一个FrameLayout设置LayoutParams的时候,遇上如题问题,java.lang.ClassCastExceptio.....
分类:移动开发   时间:2014-12-17 17:47:45    阅读次数:154
android代码编写布局和控件
//创建线性linearlayout布局对象LinearLayoutll=newLinearLayout(this);//设置linearlayout布局方向ll.setOrientation(LinearLayout.VERTICAL);//得到布局或控件高度intheight=LinearLayout.LayoutParams.MATCH_PARENT;//得到布局或控件宽度intwidth=LinearLayout.LayoutParams..
分类:移动开发   时间:2014-12-16 19:30:22    阅读次数:156
ProgressDialog弹出时的底色变暗(转)
背景:在做一个进度条时,不想让它的背景变暗,以免影响其他区域的正常显示。在网上搜索时,看到的方法多数是:方法一 :在代码中 可以这么设置 Window mWindow = getWindow(); WindowManager.LayoutParams lp = mWindow.getAttribut...
分类:其他好文   时间:2014-12-11 15:23:51    阅读次数:177
怎样动态设置GridView的宽和高(Android)
1 LinearLayout.LayoutParams linearParams2 = (LinearLayout.LayoutParams)liveGrid.getLayoutParams();2 linearParams2.width=(shipin_Adapter.getCou...
分类:移动开发   时间:2014-12-08 13:50:40    阅读次数:213
12月1日
//Activity里面编辑布局//LinearLayoutlayout=newLinearLayout(this);//LayoutParamsparam=newLayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT);//layout.setOrientation(layout.VERTICAL);//TextViewtv=newTextView(this);//tv.setTex..
分类:其他好文   时间:2014-12-02 09:06:13    阅读次数:181
WindowManager.LayoutParams 札记
WindowManager.LayoutParams wlp = new WindowManager.LayoutParams(width, height, WindowManager.LayoutParams.TYPE_SYSTEM_ERROR, ...
分类:Windows程序   时间:2014-11-27 14:20:51    阅读次数:268
android dialog和activity 改变出现消失的 动画样式
1 dialog 对话框出现和消失  使用的方法 final Dialog dialog = new Dialog(this); dialog.show(); Window window = dialog.getWindow(); WindowManager.LayoutParams lp = window.getAttributes(); window.s...
分类:移动开发   时间:2014-11-24 17:16:59    阅读次数:235
android 图库查看大图界面没有全屏显示
Gallery.java //在onCreat方法中setContentView()之前插入 getWindow().setFlags(WindowManager.LayoutParams. FLAG_FULLSCREEN ,               WindowManager.LayoutParams. FLAG_FULLSCREEN);//全屏...
分类:移动开发   时间:2014-11-24 10:05:24    阅读次数:150
Android屏蔽HOME键
1、在Android4.0之前的版本,可以在Activity中的onAttachedToWindow添加如下代码实现:@OverridepublicvoidonAttachedToWindow(){getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);super.onAttachedToWindow();}2、4.0以后的版本,处理方法如下:先自己..
分类:移动开发   时间:2014-11-22 19:02:34    阅读次数:173
android RelativeLayout 动态设置高度
定义:1 private RelativeLayout mrlay;调高度:1 mrlay = (RelativeLayout) findViewById(R.id.rlay_1);2 android.view.ViewGroup.LayoutParams pp =mrlay.get...
分类:移动开发   时间:2014-11-22 18:41:18    阅读次数:228
276条   上一页 1 ... 19 20 21 22 23 ... 28 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!