Search in sources :

Example 1 with AppsAdapter

use of com.xhsemoticonskeyboard.common.adapter.AppsAdapter 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);
}
Also used : AppsAdapter(com.xhsemoticonskeyboard.common.adapter.AppsAdapter) ArrayList(java.util.ArrayList) GridView(android.widget.GridView) AppBean(com.xhsemoticonskeyboard.common.data.AppBean)

Example 2 with AppsAdapter

use of com.xhsemoticonskeyboard.common.adapter.AppsAdapter 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);
}
Also used : AppsAdapter(com.xhsemoticonskeyboard.common.adapter.AppsAdapter) RelativeLayout(android.widget.RelativeLayout) ArrayList(java.util.ArrayList) GridView(android.widget.GridView) AppBean(com.xhsemoticonskeyboard.common.data.AppBean)

Aggregations

GridView (android.widget.GridView)2 AppsAdapter (com.xhsemoticonskeyboard.common.adapter.AppsAdapter)2 AppBean (com.xhsemoticonskeyboard.common.data.AppBean)2 ArrayList (java.util.ArrayList)2 RelativeLayout (android.widget.RelativeLayout)1