如何解决像按钮错误的Facebook

时间:2016-02-05 12:22:39

标签: javascript html css facebook facebook-like

我正在开发我的第一个网站,我在Facebook开发人员部分有关于Facebook的按钮的问题,该错误可以在下面的视频https://www.youtube.com/watch?v=t9k6CL4qGqw中看到 每当我点击"喜欢"按键 按钮改变位置。 如何修复它?

 final AlertDialog.Builder builder = new AlertDialog.Builder(this.activity,R.style.MyAlertDialogStyle);
    ImageView img_user_delete=(ImageView)convertView.findViewById(R.id.img_user_delete);
    img_user_delete.setTag(position);
    img_user_delete.setOnClickListener(new ImageView.OnClickListener() {
        @Override
        public void onClick(View v) {
            //do something
            name1_u = name_user.get(position);
            Log.e("Row_list_user", "name : " + name1_u);
            final int position = (Integer) v.getTag();
            Integer position1 = position + 1;
            builder.setMessage("Are you sure you want to delete?")
                    .setIcon(R.drawable.ic_action_warning)
                    .setTitle("Warning")
                    .setCancelable(false)
                    .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int id) {
                            db.deleteUserRow(name1_u);
                            name_user.remove(position);
                            notifyDataSetChanged();
                        }
                    })
                    .setNegativeButton("No", new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int id) {
                            dialog.cancel();

                        }
                    });
        }
    });

0 个答案:

没有答案