本文整理汇总了Java中android.support.v4.view.ViewPager.findViewById方法的典型用法代码示例。如果您正苦于以下问题:Java ViewPager.findViewById方法的具体用法?Java ViewPager.findViewById怎么用?Java ViewPager.findViewById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.v4.view.ViewPager
的用法示例。
在下文中一共展示了ViewPager.findViewById方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: TrackViewHolder
import android.support.v4.view.ViewPager; //导入方法依赖的package包/类
public TrackViewHolder(View view) {
super(view);
index = (CircularProgressButton) view.findViewById(R.id.cell_index);
artist = (TextView) view.findViewById(R.id.cell_artist);
title = (TextView) view.findViewById(R.id.cell_title);
duration = (TextView) view.findViewById(R.id.cell_duration);
textSearchAuthor = (TextView) view.findViewById(R.id.textSearchAuthor);
actionSetRingtone = view.findViewById(R.id.actionSetRingtone);
actionShare = view.findViewById(R.id.actionShare);
actionSearchArtist = view.findViewById(R.id.actionSearchAuthor);
actionDownload = view.findViewById(R.id.actionDownload);
actionToPlaylist = view.findViewById(R.id.actionToPlaylist);
actionFromPlaylist = view.findViewById(R.id.actionFromPlaylist);
artwork = (ImageView) view.findViewById(R.id.cell_artwork);
downloadProgress = (CircularProgressButton) view.findViewById(R.id.track_cell_progress_download);
viewPager = (ViewPager) view.findViewById(R.id.viewPager);
mainView = viewPager.findViewById(R.id.item_page_0);
}
示例2: PlaylistViewHolder
import android.support.v4.view.ViewPager; //导入方法依赖的package包/类
public PlaylistViewHolder(View view) {
super(view);
title = (TextView)view.findViewById(android.R.id.text1);
icon = view.findViewById(android.R.id.icon);
actionSetPlaylistAsWorking = view.findViewById(R.id.actionSetPlaylistAsWorking);
actionEditPlaylist = view.findViewById(R.id.actionEditPlaylist);
actionDropPlaylist = view.findViewById(R.id.actionDropPlaylist);
viewPager = (ViewPager)view.findViewById(R.id.viewPager);
mainView = viewPager.findViewById(R.id.item_page_0);
}
示例3: FoldersViewHolder
import android.support.v4.view.ViewPager; //导入方法依赖的package包/类
public FoldersViewHolder(View view) {
super(view);
section = (TextView)view.findViewById(R.id.section);
title = (TextView)view.findViewById(R.id.textView);
actionToPlaylist = view.findViewById(R.id.actionToPlaylist);
viewPager = (ViewPager)view.findViewById(R.id.viewPager);
mainView = viewPager.findViewById(R.id.item_page_0);
}
示例4: onCreate
import android.support.v4.view.ViewPager; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
mMainView = findViewById(R.id.pager);
mProgress = findViewById(R.id.main_progress);
mViewPager = (ViewPager) mMainView;
mTitleStrip = (PagerTitleStrip) mViewPager.findViewById(R.id.pager_title_strip);
mArrayPager = new ArrayPagerAdapter(getSupportFragmentManager());
mViewPager.setAdapter(mArrayPager);
self = this;
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
if (savedInstanceState != null) {
restoreSavedState(savedInstanceState);
}
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close) {
public void onDrawerOpened(View drawerView) {
// TextView mServerUrl = (TextView) findViewById(R.id.nav_serverurl);
// if ((Me != null) && (mServerUrl != null))
// mServerUrl.setText(Me.getName());
}
};
drawer.addDrawerListener(toggle);
toggle.syncState();
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
}