Example usage for android.widget FrameLayout setVisibility

List of usage examples for android.widget FrameLayout setVisibility

Introduction

In this page you can find the example usage for android.widget FrameLayout setVisibility.

Prototype

@RemotableViewMethod
public void setVisibility(@Visibility int visibility) 

Source Link

Document

Set the visibility state of this view.

Usage

From source file:fm.krui.kruifm.PlaylistFragment.java

/**
 * Enables and disables the loading screen on this fragment
 * @param isLoading true to show, false to hide
 *///from   w  ww.  j a  va2s .  co  m
private void showLoadingScreen(boolean isLoading) {
    FrameLayout frameLayout = (FrameLayout) rootView.findViewById(R.id.playlist_loading_framelayout);
    if (isLoading) {
        frameLayout.setVisibility(View.VISIBLE);
    } else {
        frameLayout.setVisibility(View.INVISIBLE);
    }
}

From source file:com.marcosedo.lagramola.HelpFragment.java

private void lostVisibility() {
    TabLayout tabLayout = (TabLayout) getActivity().findViewById(R.id.tabLayout);
    tabLayout.setVisibility(View.VISIBLE);
    ViewPager viewPager = (ViewPager) getActivity().findViewById(R.id.viewPager);
    viewPager.setVisibility(View.VISIBLE);
    FrameLayout outTabContent = (FrameLayout) getActivity().findViewById(R.id.outTabContent);
    outTabContent.setVisibility(View.GONE);
}

From source file:com.marcosedo.lagramola.HelpFragment.java

private void getVisibility() {
    TabLayout tabLayout = (TabLayout) getActivity().findViewById(R.id.tabLayout);
    tabLayout.setVisibility(View.GONE);
    ViewPager viewPager = (ViewPager) getActivity().findViewById(R.id.viewPager);
    viewPager.setVisibility(View.GONE);
    FrameLayout outTabContent = (FrameLayout) getActivity().findViewById(R.id.outTabContent);
    outTabContent.setVisibility(View.VISIBLE);
}

From source file:fm.krui.kruifm.WordpressViewer.java

private void showLoadingScreen(boolean isLoading) {
    FrameLayout loadingScreen = (FrameLayout) rootView.findViewById(R.id.wordpress_loading_framelayout);
    if (isLoading) {
        loadingScreen.setVisibility(View.VISIBLE);
    } else {//from  w  ww . j a v  a 2 s .c  o  m
        loadingScreen.setVisibility(View.INVISIBLE);
    }

}

From source file:fm.krui.kruifm.ArticleViewActivity.java

/**
 * Toggles the loading view on and off./*  w w w .  j  av a2 s .c o  m*/
 * @param isLoading true to display, false to hide
 */
private void showLoadingScreen(boolean isLoading) {
    FrameLayout loadingView = (FrameLayout) findViewById(R.id.article_view_loading_framelayout);

    if (isLoading) {
        loadingView.setVisibility(View.VISIBLE);
    } else {
        loadingView.setVisibility(View.INVISIBLE);
    }
}

From source file:de.gebatzens.sia.fragment.SubstFragment.java

@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    bundle = ((MainActivity) getActivity()).savedState;
    mViewPager = (ViewPager) view.findViewById(R.id.viewpager);
    substAdapter = new SubstAdapter(this, savedInstanceState, mViewPager);
    /*if(bundle != null) {
    for(int i = 0; i < substAdapter.fragments.size(); i++)
        substAdapter.fragments.get(i).spinnerPos = bundle.getInt("ggvp_frag_spinner_" + i);
    }*///from  w ww . j  a v a 2s  . c  o m
    mViewPager.setAdapter(substAdapter);
    mViewPager.setOffscreenPageLimit(2);
    if (bundle != null)
        mViewPager.setCurrentItem(bundle.getInt("ggvp_tab"));

    mTabLayout = (TabLayout) view.findViewById(R.id.tab_layout);
    mTabLayout.setupWithViewPager(mViewPager);
    if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
        mTabLayout.setPadding(toPixels(48), 0, toPixels(48), 0);
        mTabLayout.setTabMode(TabLayout.MODE_SCROLLABLE);
    } else if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
        mTabLayout.setTabMode(TabLayout.MODE_FIXED);
    }

    FrameLayout contentFrame = (FrameLayout) getActivity().findViewById(R.id.content_fragment);
    contentFrame.setVisibility(View.VISIBLE);

}

From source file:com.example.spoilerfreehighlights.MainActivity.java

@Override
public void onCompletion(MediaPlayer v) {
    FrameLayout frameLayout = (FrameLayout) findViewById(R.id.frame_listview);
    frameLayout.setVisibility(View.VISIBLE);
    finish();//from w  w  w. jav a2  s  . co  m
}

From source file:de.gebatzens.ggvertretungsplan.fragment.SubstFragment.java

@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
    bundle = ((MainActivity) getActivity()).savedState;
    mViewPager = (ViewPager) view.findViewById(R.id.viewpager);
    mGGFrag = new SubstAdapter(this, savedInstanceState, (MainActivity) getActivity());
    if (bundle != null) {
        mGGFrag.heute.spinnerPos = bundle.getInt("ggvp_frag_today_spinner");
        mGGFrag.morgen.spinnerPos = bundle.getInt("ggvp_frag_tomorrow_spinner");
    }//from ww  w .j av a2 s .c om
    mViewPager.setAdapter(mGGFrag);
    mViewPager.setOffscreenPageLimit(3);
    if (bundle != null)
        mViewPager.setCurrentItem(bundle.getInt("ggvp_tab"));

    mToolbar = (Toolbar) ((MainActivity) this.getActivity()).mToolbar;
    ColorDrawable mToolbarColor = (ColorDrawable) mToolbar.getBackground();
    int mToolbarColorId = mToolbarColor.getColor();

    mSlidingTabLayout = (SlidingTabLayout) view.findViewById(R.id.sliding_tabs);
    mSlidingTabLayout.setBackgroundColor(mToolbarColorId);
    if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
        mSlidingTabLayout.setPadding(toPixels(48), 0, toPixels(48), 0);
    } else if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
        mSlidingTabLayout.setPadding(toPixels(8), 0, toPixels(8), 0);
    }
    mSlidingTabLayout.setViewPager(mViewPager);

    swipeContainer = (SwipeRefreshLayout) view.findViewById(R.id.refresh);
    // Setup refresh listener which triggers new data loading
    swipeContainer.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
        @Override
        public void onRefresh() {
            GGApp.GG_APP.refreshAsync(new Runnable() {
                @Override
                public void run() {
                    swipeContainer.post(new Runnable() {
                        @Override
                        public void run() {
                            swipeContainer.setRefreshing(false);
                        }
                    });

                }
            }, true, GGApp.FragmentType.PLAN);
        }
    });
    // Configure the refreshing colors
    swipeContainer.setColorSchemeResources(R.color.custom_material_green, R.color.custom_material_red,
            R.color.custom_material_blue, R.color.custom_material_orange);

    FrameLayout contentFrame = (FrameLayout) getActivity().findViewById(R.id.content_fragment);
    contentFrame.setVisibility(View.VISIBLE);
    LinearLayout fragmentLayout = (LinearLayout) getActivity().findViewById(R.id.fragment_layout);
    Animation fadeIn = AnimationUtils.loadAnimation(getActivity().getApplicationContext(), R.anim.fade_in);
    fragmentLayout.startAnimation(fadeIn);

}

From source file:fm.krui.kruifm.DJInfoActivity.java

private void showLoadingScreen(boolean isLoading) {
    FrameLayout loadingScreen = (FrameLayout) findViewById(R.id.djinfo_container_loading_framelayout);
    if (isLoading) {
        loadingScreen.setVisibility(View.VISIBLE);
    } else {// w  w  w  .j  av a2  s  . c  om
        loadingScreen.setVisibility(View.INVISIBLE);
    }

}

From source file:fm.krui.kruifm.TwitterFragment.java

private void showLoadingScreen(boolean isLoading) {
    FrameLayout loadingScreen = (FrameLayout) rootView.findViewById(R.id.twitter_loading_framelayout);
    if (isLoading) {
        loadingScreen.setVisibility(View.VISIBLE);
    } else {/* w  w w .ja  va  2s.co m*/
        loadingScreen.setVisibility(View.INVISIBLE);
    }

}