Example usage for android.widget RelativeLayout setVisibility

List of usage examples for android.widget RelativeLayout setVisibility

Introduction

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

Prototype

@RemotableViewMethod
public void setVisibility(@Visibility int visibility) 

Source Link

Document

Set the visibility state of this view.

Usage

From source file:org.proninyaroslav.libretorrent.core.utils.Utils.java

public static void showColoredStatusBar_KitKat(Activity activity) {
    RelativeLayout statusBar = (RelativeLayout) activity.findViewById(R.id.statusBarKitKat);

    if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) {
        statusBar.setVisibility(View.VISIBLE);
    }/*from ww w . j av a2  s.  com*/
}

From source file:org.proninyaroslav.libretorrent.core.utils.Utils.java

public static void showActionModeStatusBar(Activity activity, boolean mode) {
    int color = (mode ? R.color.action_mode_dark : R.color.primary_dark);
    if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) {
        RelativeLayout statusBar = (RelativeLayout) activity.findViewById(R.id.statusBarKitKat);
        statusBar.setBackground(ContextCompat.getDrawable(activity, color));
        statusBar.setVisibility(View.VISIBLE);

    } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        activity.getWindow().setStatusBarColor(ContextCompat.getColor(activity, color));
    }/*from   ww w. java2 s.c  o  m*/
}

From source file:de.baumann.hhsmoodle.helper.helper_main.java

public static void showFilter(Activity activity, RelativeLayout layout, ImageView imageView, EditText editText,
        String text, String hint, boolean showKeyboard) {
    layout.setVisibility(View.VISIBLE);
    imageView.setVisibility(View.GONE);
    editText.setText(text);//from  w  w  w.  j a  v  a 2  s  . c o m
    editText.setHint(hint);
    editText.requestFocus();
    if (showKeyboard) {
        helper_main.showKeyboard(activity, editText);
    }
}

From source file:de.baumann.hhsmoodle.helper.helper_main.java

public static void hideFilter(Activity activity, RelativeLayout layout, ImageView imageView) {
    InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.hideSoftInputFromWindow(layout.getWindowToken(), 0);
    imageView.setVisibility(View.VISIBLE);
    layout.setVisibility(View.GONE);
}

From source file:com.webianks.library.ShowHideAnimation.java

public void animateIn(RelativeLayout view) {
    view.setVisibility(View.VISIBLE);
    Animation anim = AnimationUtils.loadAnimation(view.getContext(), R.anim.pop_in);
    anim.setDuration(300L);/*from   w ww . j  av a 2 s  .co m*/
    anim.setInterpolator(INTERPOLATOR);
    view.startAnimation(anim);
}

From source file:com.xogrp.planner.fragment.PortfolioSlidePageFragment.java

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    // Inflate the layout containing a title and body text.
    ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.fragment_portfolio_images_slide_page, container,
            false);//from w  w w  .j av a2  s. c o  m
    ImageView ivImage = (ImageView) rootView.findViewById(R.id.iv_pic);
    RelativeLayout rlPlay = (RelativeLayout) rootView.findViewById(R.id.rl_play);
    rlPlay.setVisibility(mMediaItem.getMediaType().equalsIgnoreCase(MEDIA_TYPE) ? View.VISIBLE : View.GONE);
    String imageUrl = mMediaItem.getMediaType().equalsIgnoreCase(MEDIA_TYPE) ? mMediaItem.getThumbnailUrl()
            : mMediaItem.getVideoUrl();
    ImageLoader.getInstance().displayImage(imageUrl, ivImage,
            PlannerApplication.getDefaultDisplayImageOptions(R.drawable.vendor_summary_item_bg_default), null);
    ivImage.setOnClickListener(mOnClickListener);

    return rootView;
}

From source file:cz.yetanotherview.webcamviewer.app.fragments.BaseFragment.java

public void showProgressBar() {
    RelativeLayout progress = (RelativeLayout) getActivity().findViewById(R.id.progressBarFetch);
    progress.setVisibility(View.VISIBLE);
}

From source file:cz.yetanotherview.webcamviewer.app.fragments.BaseFragment.java

public void hideProgressBar() {
    RelativeLayout progress = (RelativeLayout) getActivity().findViewById(R.id.progressBarFetch);
    progress.setVisibility(View.GONE);
}

From source file:sysnetlab.android.sdc.ui.fragments.ExperimentSensorSelectionFragment.java

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    Log.d("SensorDataCollector", "ExperimentSensorSelectionFragment::onCreateView(): "
            + "entered with mHavingHeader = " + mHavingHeader);

    mView = inflater.inflate(R.layout.fragment_sensor_selection, container, false);

    mHavingHeader = getActivity().getIntent().getBooleanExtra("havingheader", false);

    if (mHavingHeader) {
        RelativeLayout layout = (RelativeLayout) mView.findViewById(R.id.layout_sensor_selection_header);
        layout.setVisibility(View.VISIBLE);
    }/*from  w ww .  ja  v a2s .c om*/

    // find the container for the list
    RelativeLayout layout = (RelativeLayout) mView.findViewById(R.id.layout_sensor_selection_list);

    mListView = new ListView(getActivity());
    if (!SensorDiscoverer.isInitialized())
        SensorDiscoverer.initialize(getActivity().getApplicationContext());
    List<AbstractSensor> lstSensors = SensorDiscoverer.discoverSensorList();

    Activity activity = getActivity();
    if (activity instanceof CreateExperimentActivity) {
        ((CreateExperimentActivity) activity).selectSensors(lstSensors);
    } else {
        Log.d("SensorDataCollector",
                "ExperimentSensorSelectionFragment::onCreate(): " + "not a CreateExperimentActivity.");
    }

    mSensorListAdaptor = new SensorListAdapter(getActivity(), lstSensors);

    mListView.setAdapter(mSensorListAdaptor);
    layout.addView(mListView);

    return mView;
}

From source file:com.cypress.cysmart.CommonFragments.ContactUsFragment.java

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.contact_us_fragment, container, false);
    RelativeLayout layout = (RelativeLayout) rootView.findViewById(R.id.cont_parent);
    /**// www.  ja  va2  s.c o m
     * Checking the network, Displaying the contact webPage for Cypress
     * Semiconductors.
     */
    layout.setVisibility(View.VISIBLE);

    return rootView;
}