makeText
(getActivity(), "Интернетті қосу керек!",
Toast.
LENGTH_SHORT
).show();
progressDialog.dismiss();
}
});
RequestQueue requestQueue = Volley.
newRequestQueue
(getActivity());
requestQueue.add(stringRequest);
}
}
4.
MyAdapter.java беті
package com.kaznitu.findsystem.Fragment_pages;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import static com.kaznitu.findsystem.Fragment_pages.TabFragment.
int_items
;
Б қосымшасының жалғасы
public class MyAdapter extends FragmentPagerAdapter {
public MyAdapter(FragmentManager fm)
{
super(fm);
}
@Override
public Fragment getItem(int position) {
switch (position){
case 0:
return new Home();
case 1:
return new Gallery();
}
return null;
}
@Override
public int getCount() {
return
int_items
;
}
public CharSequence getPageTitle(int position){
switch (position){
case 0:
return "Жаңалықтар";
case 1:
return "Галерея";
}
return null;
}
}
Достарыңызбен бөлісу: |