典型错误案例:
经常我们会通过addView方法,动态添加一些子布局,比如下面的一段代码.
LinearLayout linParent = (LinearLayout) findViewById(R.id.aty_slider_linParent);View vChild = mInflater.inflate(R.layout.view_loding, null);linP...
分类:
移动开发 时间:
2014-05-22 09:41:22
阅读次数:
553
当GridPanel被添加到容器,且容器的layout为vbox时候, 会出现 Layout run failed 后者GridPanel的尺寸没有撑满父容器
网上找到的解决办法是,要给父容器设置一个高度,但问题是,高度没有办法定死。切写死后,也没有解决此问题。
此时修改父容器的layout为
layout: {
type: 'vbox',
al...
分类:
Web程序 时间:
2014-05-22 08:30:15
阅读次数:
362
1、如何定义和生成GTIDs唯一性:在所有主从库都是唯一的,由二元组构成GTID =
source_id:transaction_idsource_id标记主库的1.1
server_uuid获取server_uuid的方式a、判断data_dir/auto.cnf文件是否存在,如果存在返回b、不存...
分类:
数据库 时间:
2014-05-21 23:11:36
阅读次数:
459
今天在做布局的时候,遇到个纳闷的问题。我想将一个div块水平分为宽50%的两部分,分别为两个链接按钮,HTML代码如下:
link1 link2自然而然想到了用display:inline-block来触发layout又不换行;a{ display:inline-block;
...
分类:
其他好文 时间:
2014-05-21 18:56:32
阅读次数:
207
今天编写代码如下:发现2个radiobutton居然都可以选中。这我真的晕了。。后来偶然发现原来是没有设置Id的原因。。。
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizont...
分类:
其他好文 时间:
2014-05-21 17:12:25
阅读次数:
246
介绍一个grid layout 顺序显示的代码
LayoutAnimation1.java
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use th...
分类:
其他好文 时间:
2014-05-21 16:58:47
阅读次数:
214
描述list layout item有上倒下依次显示的代码实现形式
LayoutAnimation2.java
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may no...
分类:
其他好文 时间:
2014-05-21 09:02:15
阅读次数:
250
介绍list item倒序显示
LayoutAnimation3.java
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file e...
分类:
其他好文 时间:
2014-05-21 08:25:44
阅读次数:
278
编程题:展示自动变量在内存中的生存期。#include<stdio.h>voidf(intn){autoints=0;/*auto可以省略*/s=s+1;printf("No.%d:s=%d\n",n,s);}voidmain(){intnum;for(num=1;num<4;num++) f(num);}
分类:
其他好文 时间:
2014-05-20 20:23:15
阅读次数:
260
Ext常用的布局都在Ext.layout下,这里几乎涵盖了所有的布局方式,满足开发者需求。那么我们就其中常用的方式逐一介绍。
Border布局
Border布局是Ext中常用布局方式(经常用到整个页面的总体布局),感觉用的几率很大。在看代码之前先熟悉一种特殊的容器ViewPort,它是对于浏览器视窗的抽象,你可以将它理解为浏览器的可见区域,它将渲染到document.body并自动调整大小,一...
分类:
Web程序 时间:
2014-05-20 14:25:45
阅读次数:
410