Q:

Change position Messages of chat in ListView?

I created a custom adapter for my chat page that it show messages in a listView for the firstUser open a box in right side for show message and for secondUser open a box in left side for show message but when full the page and scroll the page . change the position of messages ?? 
My code is huge but it is my Custom Adapter :
public class AdapterConversation extends ArrayAdapter<StructConversation>{
    public static String co;
    public AdapterConversation(ArrayList<StructConversation> array){
        super(G.context, MClear().equals("pasokh") ? R.layout.out : R.layout.in_out_conversation , array);
        MClear();
    }
    private static class ViewHolder{
        public TextView NameTitle;
        public TextView Conver;
        public TextView dateTime;

        public ViewHolder(View view){
            NameTitle = (TextView) view.findViewById(R.id.NameTitle);
            Conver = (TextView) view.findViewById(R.id.Conver);
            dateTime = (TextView) view.findViewById(R.id.dateTime);
        }
        public void fill(ArrayAdapter<StructConversation> adapter,final StructConversation item, int position){
            NameTitle.setText(item.NameTitle);
            Conver.setText(item.Coversations);
            dateTime.setText(item.dateTime);
        }
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder holder;
        StructConversation item = getItem(position);
        if(convertView == null){
            convertView = G.inflater.inflate(MClear().equals("pasokh") ? R.layout.out : R.layout.in_out_conversation, parent,false);
            holder = new ViewHolder(convertView);
            convertView.setTag(holder);
        }else {
            holder = (ViewHolder) convertView.getTag();
        }
        holder.fill(this, item, position);
        return convertView;
    }

    public static String MClear() {
        SharedPreferences sharedPrefs = G.context.getSharedPreferences("CONVER", 0);
        co = (sharedPrefs.getString("PSA", "not"));
        sharedPrefs.edit().remove("PSA").commit();
        return co;
    }

}

A:

your viewHolder should look just like this:
private static class ViewHolder{
    public TextView NameTitle;
    public TextView Conver;
    public TextView dateTime;
}

set the members only once when creating the holder
if(convertView == null){
        convertView = G.inflater.inflate(MClear().equals("pasokh") ? R.layout.out : R.layout.in_out_conversation, parent,false);
        holder = new ViewHolder(convertView);
        // Use findViewById HERE!!
        convertView.setTag(holder);
    }

