当前位置: 首页>>代码示例>>Java>>正文


Java CustomerLogo类代码示例

本文整理汇总了Java中cn.sharesdk.onekeyshare.CustomerLogo的典型用法代码示例。如果您正苦于以下问题:Java CustomerLogo类的具体用法?Java CustomerLogo怎么用?Java CustomerLogo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CustomerLogo类属于cn.sharesdk.onekeyshare包,在下文中一共展示了CustomerLogo类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: collectCells

import cn.sharesdk.onekeyshare.CustomerLogo; //导入依赖的package包/类
protected ArrayList<Object> collectCells() {
    ArrayList<Object> cells = new ArrayList<Object>();

    Platform[] platforms = ShareSDK.getPlatformList();
    if (platforms == null) {
        platforms = new Platform[0];
    }
    HashMap<String, String> hides = getHiddenPlatforms();
    if (hides == null) {
        hides = new HashMap<String, String>();
    }
    for (Platform p : platforms) {
        if (!hides.containsKey(p.getName())) {
            cells.add(p);
        }
    }

    ArrayList<CustomerLogo> customers = getCustomerLogos();
    if (customers != null && customers.size() > 0) {
        cells.addAll(customers);
    }

    return cells;
}
 
开发者ID:gaolhjy,项目名称:cniao5,代码行数:25,代码来源:PlatformPage.java

示例2: collectCells

import cn.sharesdk.onekeyshare.CustomerLogo; //导入依赖的package包/类
protected ArrayList<Object> collectCells() {
	ArrayList<Object> cells = new ArrayList<Object>();

	Platform[] platforms = ShareSDK.getPlatformList();
	if (platforms == null) {
		platforms = new Platform[0];
	}
	HashMap<String, String> hides = getHiddenPlatforms();
	if (hides == null) {
		hides = new HashMap<String, String>();
	}
	for (Platform p : platforms) {
		if (!hides.containsKey(p.getName())) {
			cells.add(p);
		}
	}

	ArrayList<CustomerLogo> customers = getCustomerLogos();
	if (customers != null && customers.size() > 0) {
		cells.addAll(customers);
	}

	return cells;
}
 
开发者ID:wp521,项目名称:MyFire,代码行数:25,代码来源:PlatformPage.java

示例3: collectCells

import cn.sharesdk.onekeyshare.CustomerLogo; //导入依赖的package包/类
protected ArrayList<Object> collectCells() {
  ArrayList<Object> cells = new ArrayList<Object>();

  Platform[] platforms = ShareSDK.getPlatformList();
  if (platforms == null) {
    platforms = new Platform[0];
  }
  HashMap<String, String> hides = getHiddenPlatforms();
  if (hides == null) {
    hides = new HashMap<String, String>();
  }
  for (Platform p : platforms) {
    if (!hides.containsKey(p.getName())) {
      cells.add(p);
    }
  }

  ArrayList<CustomerLogo> customers = getCustomerLogos();
  if (customers != null && customers.size() > 0) {
    cells.addAll(customers);
  }

  return cells;
}
 
开发者ID:zfdang,项目名称:zSMTH-Android,代码行数:25,代码来源:PlatformPage.java

示例4: refreshPanel

import cn.sharesdk.onekeyshare.CustomerLogo; //导入依赖的package包/类
private void refreshPanel(LinearLayout[] llCells, Object[] logos) {
	int cellBack = ResHelper.getBitmapRes(page.getContext(), "ssdk_oks_classic_platform_cell_back");
	int disableBack = ResHelper.getBitmapRes(page.getContext(), "ssdk_oks_classic_platfrom_cell_back_nor");
	for (int i = 0; i < logos.length; i++) {
		ImageView ivLogo = ResHelper.forceCast(llCells[i].getChildAt(0));
		TextView tvName = ResHelper.forceCast(llCells[i].getChildAt(1));
		if (logos[i] == null) {
			ivLogo.setVisibility(View.INVISIBLE);
			tvName.setVisibility(View.INVISIBLE);
			llCells[i].setBackgroundResource(disableBack);
			llCells[i].setOnClickListener(null);
		} else {
			ivLogo.setVisibility(View.VISIBLE);
			tvName.setVisibility(View.VISIBLE);
			ivLogo.requestLayout();
			tvName.requestLayout();
			llCells[i].setBackgroundResource(cellBack);
			llCells[i].setOnClickListener(this);
			llCells[i].setTag(logos[i]);

			if (logos[i] instanceof CustomerLogo) {
				CustomerLogo logo = ResHelper.forceCast(logos[i]);
				if (logo.logo != null) {
					ivLogo.setImageBitmap(logo.logo);
				} else {
					ivLogo.setImageBitmap(null);
				}
				if (logo.label != null) {
					tvName.setText(logo.label);
				} else {
					tvName.setText("");
				}
			} else {
				Platform plat = ResHelper.forceCast(logos[i]);
				String name = plat.getName().toLowerCase();
				int resId = ResHelper.getBitmapRes(ivLogo.getContext(),"ssdk_oks_classic_" + name);
				if (resId > 0) {
					ivLogo.setImageResource(resId);
				} else {
					ivLogo.setImageBitmap(null);
				}
				resId = ResHelper.getStringRes(tvName.getContext(), "ssdk_" + name);
				if (resId > 0) {
					tvName.setText(resId);
				} else {
					tvName.setText("");
				}
			}
		}
	}
}
 
开发者ID:gaolhjy,项目名称:cniao5,代码行数:52,代码来源:PlatformPageAdapter.java

示例5: onClick

import cn.sharesdk.onekeyshare.CustomerLogo; //导入依赖的package包/类
public void onClick(View v) {
	long time = System.currentTimeMillis();
	if (time - lastClickTime < MIN_CLICK_INTERVAL) {
		return;
	}
	lastClickTime = time;

	if (v.getTag() instanceof CustomerLogo) {
		CustomerLogo logo = ResHelper.forceCast(v.getTag());
		page.performCustomLogoClick(v, logo);
	} else {
		Platform plat = ResHelper.forceCast(v.getTag());
		page.showEditPage(plat);
	}
}
 
开发者ID:gaolhjy,项目名称:cniao5,代码行数:16,代码来源:PlatformPageAdapter.java

示例6: performCustomLogoClick

import cn.sharesdk.onekeyshare.CustomerLogo; //导入依赖的package包/类
public final void performCustomLogoClick(final View v, final CustomerLogo logo) {
    beforeFinish = new Runnable() {
        public void run() {
            logo.listener.onClick(v);
        }
    };
    finish();
}
 
开发者ID:gaolhjy,项目名称:cniao5,代码行数:9,代码来源:PlatformPage.java

示例7: onClick

import cn.sharesdk.onekeyshare.CustomerLogo; //导入依赖的package包/类
public void onClick(View v) {
	long time = System.currentTimeMillis();
	if (time - lastClickTime < MIN_CLICK_INTERVAL) {
		return;
	}
	lastClickTime = time;

	if (v.getTag() instanceof CustomerLogo) {
		CustomerLogo logo = R.forceCast(v.getTag());
		page.performCustomLogoClick(v, logo);
	} else {
		Platform plat = R.forceCast(v.getTag());
		page.showEditPage(plat);
	}
}
 
开发者ID:wp521,项目名称:MyFire,代码行数:16,代码来源:PlatformPageAdapter.java

示例8: performCustomLogoClick

import cn.sharesdk.onekeyshare.CustomerLogo; //导入依赖的package包/类
public final void performCustomLogoClick(final View v, final CustomerLogo logo) {
	beforeFinish = new Runnable() {
		public void run() {
			logo.listener.onClick(v);
		}
	};
	finish();
}
 
开发者ID:wp521,项目名称:MyFire,代码行数:9,代码来源:PlatformPage.java

示例9: getView

import cn.sharesdk.onekeyshare.CustomerLogo; //导入依赖的package包/类
private LinearLayout getView(int position, OnClickListener ocL, Context context) {
	Bitmap logo;
	String label;
	OnClickListener listener;
	if (beans[position] instanceof Platform) {
		logo = getIcon((Platform) beans[position]);
		label = getName((Platform) beans[position]);
		listener = ocL;
	} else {
		logo = ((CustomerLogo) beans[position]).enableLogo;
		label = ((CustomerLogo) beans[position]).label;
		listener = ocL;
	}

	LinearLayout ll = new LinearLayout(context);
	ll.setOrientation(LinearLayout.VERTICAL);

	ImageView iv = new ImageView(context);
	int dp_5 = com.mob.tools.utils.R.dipToPx(context, 5);
	iv.setPadding(dp_5, dp_5, dp_5, dp_5);
	iv.setScaleType(ScaleType.CENTER_INSIDE);
	LayoutParams lpIv = new LayoutParams(
			LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
	lpIv.setMargins(dp_5, dp_5, dp_5, dp_5);
	lpIv.gravity = Gravity.CENTER_HORIZONTAL;
	iv.setLayoutParams(lpIv);
	iv.setImageBitmap(logo);
	ll.addView(iv);

	TextView tv = new TextView(context);
	tv.setTextColor(0xff000000);
	tv.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14);
	tv.setSingleLine();
	tv.setIncludeFontPadding(false);
	LayoutParams lpTv = new LayoutParams(
			LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
	lpTv.gravity = Gravity.CENTER_HORIZONTAL;
	lpTv.weight = 1;
	lpTv.setMargins(dp_5, 0, dp_5, dp_5);
	tv.setLayoutParams(lpTv);
	tv.setText(label);
	ll.addView(tv);
	ll.setOnClickListener(listener);

	return ll;
}
 
开发者ID:liupengandroid,项目名称:ywApplication,代码行数:47,代码来源:PlatformGridView.java


注:本文中的cn.sharesdk.onekeyshare.CustomerLogo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。