As the title

One problem:
Pictures inside the red one item I want is a button and then click on the first show how to get the second button ah? Click on the button that can hide not show the second button, why ah? But the feeling can not hide the current view
click inside the adapter operation uiQuestion two:
I want to click on that button also updated the list passed in collection of data inside, which is how the adapter by clicking on the button to update the list and then refresh listView. . . .
Help. . . .
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
1, began to have second button, set GONE, click the Show
2, Configurator, can refresh the entire data, you can customize Adapter
Reply:
II do not understand the problem, problem: After clicking the button, you want to modify the data in the list, and if there are other operations, then be done, then call adapter.notifyDatachanged () method, the UI will be redrawn. The second chart will be displayed.
Reply:
One problem: you need to spread Button Activity in adapter, with mass participation, as it can operate, and other controls are similar
Second problem: the direct use notifyDataSetChanged (); you can
For example:
Adapter refresh listview
enabled threadHandler handler = new Handler ()
{
@ Override
public void handleMessage (Message msg)
{
if (msg.what == Delete_TOPIC_SUCCESS)
{
Toast.makeText (context, "deleted successfully", Toast.LENGTH_SHORT) show ();.
myList.remove (selectIndex);
notifyDataSetChanged ();
}
else if (msg.what == Ding_TOPIC_SUCCESS)
{
Toast.makeText (context, "bumping success", Toast.LENGTH_SHORT) show ();.
. myList.get (selectIndex) setDingCount (. myList.get (selectIndex) getDingCount () +1);
notifyDataSetChanged ();
}
else if (msg.what == Ding_TOPIC_GOVER)
{
Toast.makeText (context, "the stickers that you have the top off, you can not repeat the top", Toast.LENGTH_SHORT) show ();.
notifyDataSetChanged ();
}
else
{
Toast.makeText (context, msg.getData () getString ("msg"), Toast.LENGTH_SHORT.) Show ();.
}
}
};
Reply:
case R.id.btn_house_user_cancle_id:
Toast.makeText (mContext, "Unfollow", 0) show ();.
viewHolder.btn_house_user_guanzhu.setVisibility (View.VISIBLE);
break;
For example, this will not work ah second button is not displayed. . . . . .
No comments:
Post a Comment