use of com.xhsemoticonskeyboard.common.data.AppBean in project XhsEmoticonsKeyboard by w446108264.
the class AppsAdapter method getView.
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder viewHolder;
if (convertView == null) {
viewHolder = new ViewHolder();
convertView = inflater.inflate(R.layout.item_app, null);
viewHolder.iv_icon = (ImageView) convertView.findViewById(R.id.iv_icon);
viewHolder.tv_name = (TextView) convertView.findViewById(R.id.tv_name);
convertView.setTag(viewHolder);
} else {
viewHolder = (ViewHolder) convertView.getTag();
}
final AppBean appBean = mDdata.get(position);
if (appBean != null) {
viewHolder.iv_icon.setBackgroundResource(appBean.getIcon());
viewHolder.tv_name.setText(appBean.getFuncName());
convertView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(mContext, appBean.getFuncName(), Toast.LENGTH_SHORT).show();
}
});
}
return convertView;
}
use of com.xhsemoticonskeyboard.common.data.AppBean in project XhsEmoticonsKeyboard by w446108264.
the class SimpleUserDefAppsGridView method init.
protected void init() {
GridView gv_apps = (GridView) view.findViewById(R.id.gv_apps);
gv_apps.setSelector(new ColorDrawable(Color.TRANSPARENT));
gv_apps.setNumColumns(2);
ArrayList<AppBean> mAppBeanList = new ArrayList<>();
mAppBeanList.add(new AppBean(R.mipmap.chatting_photo, "图片"));
mAppBeanList.add(new AppBean(R.mipmap.chatting_camera, "拍照"));
ChattingAppsAdapter adapter = new ChattingAppsAdapter(getContext(), mAppBeanList);
gv_apps.setAdapter(adapter);
}
use of com.xhsemoticonskeyboard.common.data.AppBean in project XhsEmoticonsKeyboard by w446108264.
the class SimpleAppsGridView method init.
protected void init() {
GridView gv_apps = (GridView) view.findViewById(R.id.gv_apps);
ArrayList<AppBean> mAppBeanList = new ArrayList<>();
mAppBeanList.add(new AppBean(R.mipmap.icon_photo, "图片"));
mAppBeanList.add(new AppBean(R.mipmap.icon_camera, "拍照"));
mAppBeanList.add(new AppBean(R.mipmap.icon_audio, "视频"));
mAppBeanList.add(new AppBean(R.mipmap.icon_qzone, "空间"));
mAppBeanList.add(new AppBean(R.mipmap.icon_contact, "联系人"));
mAppBeanList.add(new AppBean(R.mipmap.icon_file, "文件"));
mAppBeanList.add(new AppBean(R.mipmap.icon_loaction, "位置"));
AppsAdapter adapter = new AppsAdapter(getContext(), mAppBeanList);
gv_apps.setAdapter(adapter);
}
use of com.xhsemoticonskeyboard.common.data.AppBean in project XhsEmoticonsKeyboard by w446108264.
the class SimpleQqGridView method init.
protected void init() {
GridView gv_apps = (GridView) view.findViewById(R.id.gv_apps);
gv_apps.setPadding(0, 0, 0, EmoticonsKeyboardUtils.dip2px(context, 20));
RelativeLayout.LayoutParams params = (LayoutParams) gv_apps.getLayoutParams();
params.bottomMargin = EmoticonsKeyboardUtils.dip2px(context, 20);
gv_apps.setLayoutParams(params);
gv_apps.setVerticalSpacing(EmoticonsKeyboardUtils.dip2px(context, 18));
ArrayList<AppBean> mAppBeanList = new ArrayList<>();
mAppBeanList.add(new AppBean(R.mipmap.lcw, "QQ电话"));
mAppBeanList.add(new AppBean(R.mipmap.lde, "视频电话"));
mAppBeanList.add(new AppBean(R.mipmap.ldh, "短视频"));
mAppBeanList.add(new AppBean(R.mipmap.lcx, "收藏"));
mAppBeanList.add(new AppBean(R.mipmap.ldc, "发红包"));
mAppBeanList.add(new AppBean(R.mipmap.ldk, "转账"));
mAppBeanList.add(new AppBean(R.mipmap.ldf, "悄悄话"));
mAppBeanList.add(new AppBean(R.mipmap.lcu, "文件"));
AppsAdapter adapter = new AppsAdapter(getContext(), mAppBeanList);
gv_apps.setAdapter(adapter);
}
use of com.xhsemoticonskeyboard.common.data.AppBean in project XhsEmoticonsKeyboard by w446108264.
the class ChattingAppsAdapter method getView.
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder viewHolder = null;
if (convertView == null) {
viewHolder = new ViewHolder();
convertView = inflater.inflate(R.layout.item_app_userdef, null);
viewHolder.iv_icon = (ImageView) convertView.findViewById(R.id.iv_icon);
viewHolder.tv_name = (TextView) convertView.findViewById(R.id.tv_name);
convertView.setTag(viewHolder);
} else {
viewHolder = (ViewHolder) convertView.getTag();
}
final AppBean appBean = mDdata.get(position);
if (appBean != null) {
viewHolder.iv_icon.setBackgroundResource(appBean.getIcon());
viewHolder.tv_name.setText(appBean.getFuncName());
convertView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(mContext, appBean.getFuncName(), Toast.LENGTH_SHORT).show();
}
});
}
return convertView;
}
Aggregations