本文整理汇总了Java中com.mob.tools.gui.PullToRequestView.setAdapter方法的典型用法代码示例。如果您正苦于以下问题:Java PullToRequestView.setAdapter方法的具体用法?Java PullToRequestView.setAdapter怎么用?Java PullToRequestView.setAdapter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.mob.tools.gui.PullToRequestView
的用法示例。
在下文中一共展示了PullToRequestView.setAdapter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.mob.tools.gui.PullToRequestView; //导入方法依赖的package包/类
public void onCreate() {
activity.getWindow().setBackgroundDrawable(new ColorDrawable(0xfff3f3f3));
llPage = new LinearLayout(activity);
llPage.setOrientation(LinearLayout.VERTICAL);
activity.setContentView(llPage);
rlTitle = new RelativeLayout(activity);
float ratio = getRatio();
int titleHeight = (int) (getDesignTitleHeight() * ratio);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, titleHeight);
llPage.addView(rlTitle, lp);
initTitle(rlTitle, ratio);
View line = new View(activity);
LinearLayout.LayoutParams lpline = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, (int) (ratio < 1 ? 1 : ratio));
line.setBackgroundColor(0xffdad9d9);
llPage.addView(line, lpline);
FrameLayout flPage = new FrameLayout(getContext());
LinearLayout.LayoutParams lpFl = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
lpFl.weight = 1;
flPage.setLayoutParams(lpFl);
llPage.addView(flPage);
// 关注(或朋友)列表
PullToRequestView followList = new PullToRequestView(getContext());
FrameLayout.LayoutParams lpLv = new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
followList.setLayoutParams(lpLv);
flPage.addView(followList);
adapter = new FriendAdapter(this, followList);
adapter.setPlatform(platform);
adapter.setRatio(ratio);
adapter.setOnItemClickListener(this);
followList.setAdapter(adapter);
// 请求数据
followList.performPullingDown(true);
}
示例2: onCreate
import com.mob.tools.gui.PullToRequestView; //导入方法依赖的package包/类
public void onCreate() {
activity.getWindow().setBackgroundDrawable(new ColorDrawable(0xfff3f3f3));
llPage = new LinearLayout(activity);
llPage.setOrientation(LinearLayout.VERTICAL);
activity.setContentView(llPage);
rlTitle = new RelativeLayout(activity);
float ratio = getRatio();
int titleHeight = (int) (getDesignTitleHeight() * ratio);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, titleHeight);
llPage.addView(rlTitle, lp);
initTitle(rlTitle, ratio);
View line = new View(activity);
LinearLayout.LayoutParams lpline = new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, (int) (ratio < 1 ? 1 : ratio));
line.setBackgroundColor(0xffdad9d9);
llPage.addView(line, lpline);
FrameLayout flPage = new FrameLayout(getContext());
LinearLayout.LayoutParams lpFl = new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
lpFl.weight = 1;
flPage.setLayoutParams(lpFl);
llPage.addView(flPage);
// 关注(或朋友)列表
PullToRequestView followList = new PullToRequestView(getContext());
FrameLayout.LayoutParams lpLv = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
followList.setLayoutParams(lpLv);
flPage.addView(followList);
adapter = new FriendAdapter(this, followList);
adapter.setPlatform(platform);
adapter.setRatio(ratio);
adapter.setOnItemClickListener(this);
followList.setAdapter(adapter);
// 请求数据
followList.performPullingDown(true);
}
示例3: onCreate
import com.mob.tools.gui.PullToRequestView; //导入方法依赖的package包/类
public void onCreate() {
activity.getWindow().setBackgroundDrawable(new ColorDrawable(0xfff3f3f3));
llPage = new LinearLayout(activity);
llPage.setOrientation(LinearLayout.VERTICAL);
activity.setContentView(llPage);
rlTitle = new RelativeLayout(activity);
float ratio = getRatio();
int titleHeight = (int) (getDesignTitleHeight() * ratio);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, titleHeight);
llPage.addView(rlTitle, lp);
initTitle(rlTitle, ratio);
View line = new View(activity);
LinearLayout.LayoutParams lpline = new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, (int) (ratio < 1 ? 1 : ratio));
line.setBackgroundColor(0xffdad9d9);
llPage.addView(line, lpline);
FrameLayout flPage = new FrameLayout(getContext());
LinearLayout.LayoutParams lpFl = new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
lpFl.weight = 1;
flPage.setLayoutParams(lpFl);
llPage.addView(flPage);
// 关注(或朋友)列表
PullToRequestView followList = new PullToRequestView(getContext());
FrameLayout.LayoutParams lpLv = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
followList.setLayoutParams(lpLv);
flPage.addView(followList);
adapter = new com.sharesdk.onekeyshare.themes.classic.FriendAdapter(this, followList);
adapter.setPlatform(platform);
adapter.setRatio(ratio);
adapter.setOnItemClickListener(this);
followList.setAdapter(adapter);
// 请求数据
followList.performPullingDown(true);
}