正在達到報表並打印日誌,但視圖根本未被更改。文本不會更改textview,並且可見性不會更改爲'bar'(FrameLayout)。未顯示頁面視圖標題
可能是什麼問題?多謝你們。
mViewPager.setOnPageChangeListener(new OnPageChangeListener() {
@Override
public void onPageSelected(int arg0) {
if (mViewPager.getCurrentItem() == MyPageAdapter.DISCOVERY) {
findViewById(R.id.pullupTitleBar).setVisibility(1);
((TextView) findViewById(R.id.pullUpTitle)).setText("My Title 1");
Log.i("test","DICOVERY PAGE");
} else
if (mViewPager.getCurrentItem() == MyPagerAdapter.EVENTS) {
findViewById(R.id.pullupTitleBar).setVisibility(1);
((TextView) findViewById(R.id.pullUpTitle)).setText("My Title 2");
Log.i("test","EVENTS PAGE");
} else {
findViewById(R.id.pullupTitleBar).setVisibility(0);
Log.i("test","MAKE BAR NOT VISIBLE");
}
}
});
這一半回答我的問題,三江源!但由於某些原因,TextView文本仍未被更新。 – jimbob
好吧,我已經解決了問題的另一半,並在答案中引用你:)。謝了哥們! :) – jimbob