我正在使用版本2.2.3 of yetanotherforum。
我需要禁用public class MainActivity extends AppCompatActivity {
private NonSwipeableViewPager viewPager; //Declare Custom ViewPager Class
ImageButton btn_one, btn_two, btn_three, btn_four; //Declare ImageButton
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
/**SOME CODE HERE**/
//Initialize ImageButton
btn_messages = (ImageButton) findViewById(R.id.btn_one);
btn_people = (ImageButton) findViewById(R.id.btn_two);
btn_video_call = (ImageButton) findViewById(R.id.btn_three);
btn_voice_call = (ImageButton) findViewById(R.id.btn_four);
//Initialize FloatingActionButton which in the Center at the Bottom of the Parent
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//Handle some functions here...
}
});
//Initialize ViewPager
viewPager = (NonSwipeableViewPager) findViewById(R.id.viewpager);
setupViewPager(viewPager); //Call setupViewPager to setup the ViewPager
//Initialize OnClickListener in every ImageButton
btn_one.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
viewPager.setCurrentItem(0); //Trigger Page 1 of ViewPager
}
});
btn_two.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
viewPager.setCurrentItem(1); //Trigger Page 2 of ViewPager
}
});
btn_three.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
viewPager.setCurrentItem(2); //Trigger Page 3 of ViewPager
}
});
btn_four.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
viewPager.setCurrentItem(3); //Trigger Page 4 of ViewPager
}
});
}
//This function setup the ViewPager
private void setupViewPager(ViewPager viewPager) {
ViewPagerAdapter adapter = new ViewPagerAdapter(getSupportFragmentManager());
adapter.addFragment(new Fragment_Zero(), "ZERO");
adapter.addFragment(new Fragment_One(), "ONE");
adapter.addFragment(new Fragment_Two(), "TWO");
adapter.addFragment(new Fragment_Three(), "THREE");
viewPager.setAdapter(adapter);
}
//Inner Class for ViewPagerAdapter
class ViewPagerAdapter extends FragmentPagerAdapter {
private final List<Fragment> mFragmentList = new ArrayList<>();
private final List<String> mFragmentTitleList = new ArrayList<>();
public ViewPagerAdapter(FragmentManager manager) {
super(manager);
}
@Override
public Fragment getItem(int position) {
return mFragmentList.get(position);
}
@Override
public int getCount() {
return mFragmentList.size();
}
public void addFragment(Fragment fragment, String title) {
mFragmentList.add(fragment);
mFragmentTitleList.add(title);
}
@Override
public CharSequence getPageTitle(int position) {
return null;
// return mFragmentTitleList.get(position);
}
}
//END
}
功能,因为它每隔几毫秒就会继续发出ajax请求。我尝试通过管理员下的电路板设置,但找不到任何关于shoutbox的设置。
如何禁用它?
答案 0 :(得分:1)
可以在主机&gt;下的主机设置中禁用呼喊框功能。主机设置&gt;显示标签