微信支付电子回单绑定的手机卡被锁收不到回单号和验证码上不了微信支付电子回单

android中GridView &和ListView放在scrollView中时会默认的只有一行高这时就要我们自己计算出它的高度啦
首先是listview的
//动态设置listview的高度
public void setListViewHeightBasedOnChildren(ListView listView) {
// 获取ListView对应的Adapter
ListAdapter listAdapter = listView.getAdapter();
if (listAdapter == null) {
int totalHeight = 0;
for (int i = 0; i & listAdapter.getCount(); i++) {
View listItem = listAdapter.getView(i, null, listView);
listItem.measure(0, 0);
totalHeight += listItem.getMeasuredHeight();
ViewGroup.LayoutParams params = listView.getLayoutParams();
params.height = totalHeight + (listView.getDividerHeight() * (listAdapter.getCount()-1));
((MarginLayoutParams)params).setMargins(10, 10, 10, 10);
listView.setLayoutParams(params);
下面是Gridview的&&注意里面要设置你的列数
void setListViewHeightBasedOnChildren(GridView listView) {
// 获取listview的adapter
ListAdapter listAdapter = listView.getAdapter();
if (listAdapter == null) {
// 固定列宽,有多少列
int col = 4;// listView.getNumColumns();
int totalHeight = 0;
// i每次加4,相当于listAdapter.getCount()小于等于4时 循环一次,计算一次item的高度,
// listAdapter.getCount()小于等于8时计算两次高度相加
for (int i = 0; i & listAdapter.getCount(); i += col) {
// 获取listview的每一个item
View listItem = listAdapter.getView(i, null, listView);
listItem.measure(0, 0);
// 获取item的高度和
totalHeight += listItem.getMeasuredHeight()+40;
//添加40顶边距等
// 获取listview的布局参数
ViewGroup.LayoutParams params = listView.getLayoutParams();
// 设置高度
params.height = totalH
// 设置margin
((MarginLayoutParams) params).setMargins(10, 10, 10, 10);
// 设置参数
listView.setLayoutParams(params);
阅读(...) 评论()温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!&&|&&
LOFTER精选
网易考拉推荐
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
var& i,listwith:I& newwith:Dbegin& &Lst_Info.DoubleBuffered :=T& &listwith :=Lst_Info.W& &newwith :=listwith/ListW& &ListWidth:=& &Lst_Info.Items.BeginU& &for &i:=0 to Lst_Info.Columns.Count - 1 do& &begin& & & Lst_Info.Columns[i].Width:= Round(Lst_Info.Columns[i].Width * newwith) ;& && &Lst_Info.Items.EndUListWidth //全局变量,面板创建的时候,将面板的宽度赋值给它Lst_Info &//listview
阅读(340)|
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
历史上的今天
loftPermalink:'',
id:'fks_',
blogTitle:'listview的Column自适应',
blogAbstract:'procedure TF_AlarmProcHis.Lst_InfoResize(Sender: TObject);var& i,listwith:I& newwith:Dbegin& &Lst_Info.DoubleBuffered :=T& &listwith :=Lst_Info.W& &newwith :=listwith/ListW& &ListWidth:=& &Lst_Info.Items.BeginU',
blogTag:'delphi',
blogUrl:'blog/static/',
isPublished:1,
istop:false,
modifyTime:1,
publishTime:3,
permalink:'blog/static/',
commentCount:0,
mainCommentCount:0,
recommendCount:0,
bsrk:-100,
publisherId:0,
recomBlogHome:false,
currentRecomBlog:false,
attachmentsFileIds:[],
groupInfo:{},
friendstatus:'none',
followstatus:'unFollow',
pubSucc:'',
visitorProvince:'',
visitorCity:'',
visitorNewUser:false,
postAddInfo:{},
mset:'000',
remindgoodnightblog:false,
isBlackVisitor:false,
isShowYodaoAd:false,
hostIntro:'',
hmcon:'1',
selfRecomBlogCount:'0',
lofter_single:''
{list a as x}
{if x.moveFrom=='wap'}
{elseif x.moveFrom=='iphone'}
{elseif x.moveFrom=='android'}
{elseif x.moveFrom=='mobile'}
${a.selfIntro|escape}{if great260}${suplement}{/if}
{list a as x}
推荐过这篇日志的人:
{list a as x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
转载记录:
{list d as x}
{list a as x}
{list a as x}
{list a as x}
{list a as x}
{if x_index>4}{break}{/if}
${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{list a as x}
{if !!(blogDetail.preBlogPermalink)}
{if !!(blogDetail.nextBlogPermalink)}
{list a as x}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
{list a as x}
{var first_option =}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if}&&“${b[voteToOption_index]}”&&
{if (x.role!="-1") },“我是${c[x.role]}”&&{/if}
&&&&&&&&${fn1(x.voteTime)}
{if x.userName==''}{/if}
网易公司版权所有&&
{list x.l as y}
{if defined('wl')}
{list wl as x}{/list}

我要回帖

更多关于 微信支付回单 的文章

 

随机推荐