Java Code Examples for android.widget.ViewFlipper#getDisplayedChild()
The following examples show how to use
android.widget.ViewFlipper#getDisplayedChild() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ProfileFragment.java From WaniKani-for-Android with GNU General Public License v3.0 | 4 votes |
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_profile, container, false); context = getActivity(); mAvatar = (ImageView) rootView.findViewById(R.id.profile_avatar); mUsername = (TextView) rootView.findViewById(R.id.profile_username); mTitle = (TextView) rootView.findViewById(R.id.profile_title); mLevel = (TextView) rootView.findViewById(R.id.profile_level); mTopicsCount = (TextView) rootView.findViewById(R.id.profile_topics_count); mPostsCount = (TextView) rootView.findViewById(R.id.profile_posts_count); mCreationDate = (TextView) rootView.findViewById(R.id.profile_creation_date); mAbout = (TextView) rootView.findViewById(R.id.profile_about); mWebsite = (TextView) rootView.findViewById(R.id.profile_website); mTwitter = (TextView) rootView.findViewById(R.id.profile_twitter); mAboutCard = (CardView) rootView.findViewById(R.id.profile_about_card); mWebsiteHolder = (RelativeLayout) rootView.findViewById(R.id.profile_website_holder); mTwitterHolder = (RelativeLayout) rootView.findViewById(R.id.profile_twitter_holder); mViewFlipper = (ViewFlipper) rootView.findViewById(R.id.profile_view_flipper); if (PrefManager.isProfileFirstTime()) { if (mViewFlipper.getDisplayedChild() == 0) { mViewFlipper.showNext(); } } if (!MainActivity.isFirstSyncProfileDone) { fetchData(); MainActivity.isFirstSyncProfileDone = true; } else { fetchData(); } return rootView; }
Example 2
Source File: RecentActivity.java From document-viewer with GNU General Public License v3.0 | 4 votes |
int getViewMode() { final ViewFlipper vf = getViewflipper(); return vf != null ? vf.getDisplayedChild() : VIEW_RECENT; }