Skip to content Skip to sidebar Skip to footer

Pagerslidingtabstrip- Custom View Using List Fragment Shows Abrupt Behaviour

I am using PagerSlidingTabStrip to create a sliding tabs. I was successfully able to use this library in my project. Based on selected/clicked tab, the application should send a ge

Solution 1:

I looked a bit your code but I found some errors:

first change this :

@Override
    protected void onPostExecute(Void args) {
    arrayOfUsers.clear();
    arrayOfUsers.addAll(User.fromJson(ja));
    if(useradapter!=null){
    useradapter.notifyDataSetChanged();
    }
        // Close the progressbar
    mProgressDialog.dismiss();
    }

next: Create your Users Array like this:

private ArrayList<User> arrayOfUsers=new ArrayLit<User>();

change this:

@Overridepublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    ViewrootView= inflater.inflate(R.layout.fragment,
            container, false);
    listView = (ListView) rootView.findViewById(android.R.id.list);
    if(userAdapter==null){
    userAdapter=newUsersAdapter(getActivity(), android.R.id.list,arrayOfUsers);
    listView.setAdapter(userAdapter);
    }
    return rootView;
}

Post a Comment for "Pagerslidingtabstrip- Custom View Using List Fragment Shows Abrupt Behaviour"