Java源码示例:m.framework.ui.widget.pulltorefresh.PullToRefreshView
示例1
public FollowAdapter(PullToRefreshView view) {
super(view);
curPage = -1;
hasNext = true;
map = new HashMap<String, Following>();
follows = new ArrayList<Following>();
llHeader = new PRTHeader(getContext());
int resId = getBitmapRes(getContext(), "auth_follow_cb_chd");
if (resId > 0) {
bmChd = BitmapFactory.decodeResource(view.getResources(), resId);
}
resId = getBitmapRes(getContext(), "auth_follow_cb_unc");
if (resId > 0) {
bmUnch = BitmapFactory.decodeResource(view.getResources(), resId);
}
}
示例2
public FollowAdapter(PullToRefreshView view) {
super(view);
curPage = -1;
hasNext = true;
map = new HashMap<String, Following>();
follows = new ArrayList<Following>();
llHeader = new PRTHeader(getContext());
int resId = getBitmapRes(getContext(), "auth_follow_cb_chd");
if (resId > 0) {
bmChd = BitmapFactory.decodeResource(view.getResources(), resId);
}
resId = getBitmapRes(getContext(), "auth_follow_cb_unc");
if (resId > 0) {
bmUnch = BitmapFactory.decodeResource(view.getResources(), resId);
}
}
示例3
public FollowAdapter(PullToRefreshView view) {
super(view);
curPage = -1;
hasNext = true;
map = new HashMap<String, Following>();
follows = new ArrayList<Following>();
llHeader = new PRTHeader(getContext());
int resId = getBitmapRes(getContext(), "auth_follow_cb_chd");
if (resId > 0) {
bmChd = BitmapFactory.decodeResource(view.getResources(), resId);
}
resId = getBitmapRes(getContext(), "auth_follow_cb_unc");
if (resId > 0) {
bmUnch = BitmapFactory.decodeResource(view.getResources(), resId);
}
}
示例4
public FollowAdapter(PullToRefreshView view) {
super(view);
curPage = -1;
hasNext = true;
map = new HashMap<String, Following>();
follows = new ArrayList<Following>();
llHeader = new PRTHeader(getContext());
int resId = getBitmapRes(getContext(), "auth_follow_cb_chd");
if (resId > 0) {
bmChd = BitmapFactory.decodeResource(view.getResources(), resId);
}
resId = getBitmapRes(getContext(), "auth_follow_cb_unc");
if (resId > 0) {
bmUnch = BitmapFactory.decodeResource(view.getResources(), resId);
}
}
示例5
public FollowAdapter(PullToRefreshView view) {
super(view);
curPage = -1;
hasNext = true;
map = new HashMap<String, Following>();
follows = new ArrayList<Following>();
llHeader = new PRTHeader(getContext());
int resId = getBitmapRes(getContext(), "auth_follow_cb_chd");
if (resId > 0) {
bmChd = BitmapFactory.decodeResource(view.getResources(), resId);
}
resId = getBitmapRes(getContext(), "auth_follow_cb_unc");
if (resId > 0) {
bmUnch = BitmapFactory.decodeResource(view.getResources(), resId);
}
}
示例6
public ConversationAdapter(PullToRefreshView view) {
super(view);
conversationlist = new ArrayList<Reply>();
getListView().setDivider(new ColorDrawable());
getListView().setDividerHeight(0);
store = Store.getInstance(getContext());
FeedbackAgent.setFeedbackListener(this);
}
示例7
public APPAdapter(PullToRefreshView view) {
super(view);
//network = new NetworkThread();
applist = new ArrayList<APP>();
getListView().setDivider(new ColorDrawable());
getListView().setDividerHeight(0);
}
示例8
public void onCreate() {
LinearLayout llPage = new LinearLayout(getContext());
llPage.setBackgroundColor(0xfff5f5f5);
llPage.setOrientation(LinearLayout.VERTICAL);
activity.setContentView(llPage);
// 标题栏
llTitle = new TitleLayout(getContext());
int resId = getBitmapRes(getContext(), "title_back");
if (resId > 0) {
llTitle.setBackgroundResource(resId);
}
llTitle.getBtnBack().setOnClickListener(this);
resId = getStringRes(getContext(), "multi_share");
if (resId > 0) {
llTitle.getTvTitle().setText(resId);
}
llTitle.getBtnRight().setVisibility(View.VISIBLE);
resId = getStringRes(getContext(), "finish");
if (resId > 0) {
llTitle.getBtnRight().setText(resId);
}
llTitle.getBtnRight().setOnClickListener(this);
llTitle.setLayoutParams(new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
llPage.addView(llTitle);
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);
// 关注(或朋友)列表
PullToRefreshView followList = new PullToRefreshView(getContext());
FrameLayout.LayoutParams lpLv = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
followList.setLayoutParams(lpLv);
flPage.addView(followList);
adapter = new FollowAdapter(followList);
adapter.setPlatform(platform);
followList.setAdapter(adapter);
adapter.getListView().setOnItemClickListener(this);
ImageView ivShadow = new ImageView(getContext());
resId = getBitmapRes(getContext(), "title_shadow");
if (resId > 0) {
ivShadow.setBackgroundResource(resId);
}
FrameLayout.LayoutParams lpSd = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
ivShadow.setLayoutParams(lpSd);
flPage.addView(ivShadow);
// 请求数据
followList.performPulling(true);
}
示例9
public void onCreate() {
LinearLayout llPage = new LinearLayout(getContext());
llPage.setBackgroundColor(0xfff5f5f5);
llPage.setOrientation(LinearLayout.VERTICAL);
activity.setContentView(llPage);
// 标题栏
llTitle = new TitleLayout(getContext());
int resId = getBitmapRes(getContext(), "title_back");
if (resId > 0) {
llTitle.setBackgroundResource(resId);
}
llTitle.getBtnBack().setOnClickListener(this);
resId = getStringRes(getContext(), "multi_share");
if (resId > 0) {
llTitle.getTvTitle().setText(resId);
}
llTitle.getBtnRight().setVisibility(View.VISIBLE);
resId = getStringRes(getContext(), "finish");
if (resId > 0) {
llTitle.getBtnRight().setText(resId);
}
llTitle.getBtnRight().setOnClickListener(this);
llTitle.setLayoutParams(new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
llPage.addView(llTitle);
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);
// 关注(或朋友)列表
PullToRefreshView followList = new PullToRefreshView(getContext());
FrameLayout.LayoutParams lpLv = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
followList.setLayoutParams(lpLv);
flPage.addView(followList);
adapter = new FollowAdapter(followList);
adapter.setPlatform(platform);
followList.setAdapter(adapter);
adapter.getListView().setOnItemClickListener(this);
ImageView ivShadow = new ImageView(getContext());
resId = getBitmapRes(getContext(), "title_shadow");
if (resId > 0) {
ivShadow.setBackgroundResource(resId);
}
FrameLayout.LayoutParams lpSd = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
ivShadow.setLayoutParams(lpSd);
flPage.addView(ivShadow);
// 请求数据
followList.performPulling(true);
}
示例10
public void onCreate() {
LinearLayout llPage = new LinearLayout(getContext());
llPage.setBackgroundColor(0xfff5f5f5);
llPage.setOrientation(LinearLayout.VERTICAL);
activity.setContentView(llPage);
// 标题栏
llTitle = new TitleLayout(getContext());
int resId = getBitmapRes(getContext(), "title_back");
if (resId > 0) {
llTitle.setBackgroundResource(resId);
}
llTitle.getBtnBack().setOnClickListener(this);
resId = getStringRes(getContext(), "multi_share");
if (resId > 0) {
llTitle.getTvTitle().setText(resId);
}
llTitle.getBtnRight().setVisibility(View.VISIBLE);
resId = getStringRes(getContext(), "finish");
if (resId > 0) {
llTitle.getBtnRight().setText(resId);
}
llTitle.getBtnRight().setOnClickListener(this);
llTitle.setLayoutParams(new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
llPage.addView(llTitle);
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);
// 关注(或朋友)列表
PullToRefreshView followList = new PullToRefreshView(getContext());
FrameLayout.LayoutParams lpLv = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
followList.setLayoutParams(lpLv);
flPage.addView(followList);
adapter = new FollowAdapter(followList);
adapter.setPlatform(platform);
followList.setAdapter(adapter);
adapter.getListView().setOnItemClickListener(this);
ImageView ivShadow = new ImageView(getContext());
resId = getBitmapRes(getContext(), "title_shadow");
if (resId > 0) {
ivShadow.setBackgroundResource(resId);
}
FrameLayout.LayoutParams lpSd = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
ivShadow.setLayoutParams(lpSd);
flPage.addView(ivShadow);
// 请求数据
followList.performPulling(true);
}
示例11
public void onCreate() {
LinearLayout llPage = new LinearLayout(getContext());
llPage.setBackgroundColor(0xfff5f5f5);
llPage.setOrientation(LinearLayout.VERTICAL);
activity.setContentView(llPage);
// 标题栏
llTitle = new TitleLayout(getContext());
int resId = getBitmapRes(getContext(), "title_back");
if (resId > 0) {
llTitle.setBackgroundResource(resId);
}
llTitle.getBtnBack().setOnClickListener(this);
resId = getStringRes(getContext(), "multi_share");
if (resId > 0) {
llTitle.getTvTitle().setText(resId);
}
llTitle.getBtnRight().setVisibility(View.VISIBLE);
resId = getStringRes(getContext(), "finish");
if (resId > 0) {
llTitle.getBtnRight().setText(resId);
}
llTitle.getBtnRight().setOnClickListener(this);
llTitle.setLayoutParams(new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
llPage.addView(llTitle);
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);
// 关注(或朋友)列表
PullToRefreshView followList = new PullToRefreshView(getContext());
FrameLayout.LayoutParams lpLv = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
followList.setLayoutParams(lpLv);
flPage.addView(followList);
adapter = new FollowAdapter(followList);
adapter.setPlatform(platform);
followList.setAdapter(adapter);
adapter.getListView().setOnItemClickListener(this);
ImageView ivShadow = new ImageView(getContext());
resId = getBitmapRes(getContext(), "title_shadow");
if (resId > 0) {
ivShadow.setBackgroundResource(resId);
}
FrameLayout.LayoutParams lpSd = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
ivShadow.setLayoutParams(lpSd);
flPage.addView(ivShadow);
// 请求数据
followList.performPulling(true);
}
示例12
public void onCreate() {
LinearLayout llPage = new LinearLayout(getContext());
llPage.setBackgroundColor(0xfff5f5f5);
llPage.setOrientation(LinearLayout.VERTICAL);
activity.setContentView(llPage);
// title bar
llTitle = new TitleLayout(getContext());
int resId = getBitmapRes(getContext(), "title_back");
if (resId > 0) {
llTitle.setBackgroundResource(resId);
}
llTitle.getBtnBack().setOnClickListener(this);
resId = getStringRes(getContext(), "multi_share");
if (resId > 0) {
llTitle.getTvTitle().setText(resId);
}
llTitle.getBtnRight().setVisibility(View.VISIBLE);
resId = getStringRes(getContext(), "finish");
if (resId > 0) {
llTitle.getBtnRight().setText(resId);
}
llTitle.getBtnRight().setOnClickListener(this);
llTitle.setLayoutParams(new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
llPage.addView(llTitle);
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);
// the list of friends or followings
PullToRefreshView followList = new PullToRefreshView(getContext());
FrameLayout.LayoutParams lpLv = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
followList.setLayoutParams(lpLv);
flPage.addView(followList);
adapter = new FollowAdapter(followList);
adapter.setPlatform(platform);
followList.setAdapter(adapter);
adapter.getListView().setOnItemClickListener(this);
ImageView ivShadow = new ImageView(getContext());
resId = getBitmapRes(getContext(), "title_shadow");
if (resId > 0) {
ivShadow.setBackgroundResource(resId);
}
FrameLayout.LayoutParams lpSd = new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
ivShadow.setLayoutParams(lpSd);
flPage.addView(ivShadow);
// request data
followList.performPulling(true);
}