Example usage for android.view ViewGroup addView

List of usage examples for android.view ViewGroup addView

Introduction

In this page you can find the example usage for android.view ViewGroup addView.

Prototype

public void addView(View child) 

Source Link

Document

Adds a child view.

Usage

From source file:com.nextgis.maplibui.formcontrol.RadioGroup.java

@Override
public void addToLayout(ViewGroup layout) {
    layout.addView(this);
    GreyLine.addToLayout(layout);
}

From source file:de.kuschku.quasseldroid_ng.ui.setup.slides.SlideFragment.java

@Nullable
@Override/*  w  w  w.  j a va 2s.c  om*/
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
        @Nullable Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.slide, container, false);
    ViewGroup viewGroup = (ViewGroup) view.findViewById(R.id.content_host);
    viewGroup.addView(onCreateContent(inflater, viewGroup, savedInstanceState));

    ((TextView) view.findViewById(R.id.title)).setText(getTitle());
    ((TextView) view.findViewById(R.id.description)).setText(getDescription());

    return view;
}

From source file:com.telenav.expandablepager.adapter.ExpandablePagerAdapter.java

/**
 * Attaches the view to the container and gives it a specific id. Return the result of this method when overriding {@link #instantiateItem(ViewGroup, int)}
 * @param container view container//  w  ww .  j  a  v a2  s .  c  o m
 * @param v inflated view
 * @param position position of the view in the adapter
 * @return inflated view
 */
protected View attach(ViewGroup container, View v, int position) {
    v.setId(R.id.internal_page_id % 10000 + position);
    container.addView(v);
    return v;
}

From source file:com.nextgis.maplibui.formcontrol.Coordinates.java

@Override
public void addToLayout(ViewGroup layout) {
    if (!mHidden)
        layout.addView(this);
}

From source file:com.so2.running.GraphAdapter.java

public Object instantiateItem(ViewGroup container, int position) {
    View v = views.get(position);
    container.addView(v);
    return v;//w  w  w.j  ava  2  s .c o m
}

From source file:info.papdt.blacklight.support.Utility.java

public static View addActionViewToCustom(View v, ViewGroup custom) {
    if (v != null) {
        ViewGroup parent = (ViewGroup) v.getParent();
        parent.removeView(v);//from  ww w. j  a  v a  2 s.  co  m
        parent.setVisibility(View.GONE);
        ViewGroup.LayoutParams params = parent.getLayoutParams();
        params.width = 0;
        params.height = 0;
        parent.setLayoutParams(params);
        custom.addView(v);
    }

    return v;
}

From source file:com.inno.wang.view.smartlayout.v13.ViewPagerItemAdapter.java

@Override
public Object instantiateItem(ViewGroup container, int position) {
    View view = getPagerItem(position).initiate(inflater, container);
    container.addView(view);
    holder.put(position, new WeakReference<View>(view));
    return view;//from w  w  w. j  a va 2s .  c  om
}

From source file:com.king.base.adapter.ViewPagerAdapter.java

@Override
public Object instantiateItem(ViewGroup container, int position) {
    View view = getView(container, listData.get(position), position);
    container.addView(view);
    return view;//from ww  w  .j a va2  s. co m
}

From source file:com.socialinfotech.tabbar.smart.utils.ViewPagerItemAdapter.java

@Override
public Object instantiateItem(ViewGroup container, int position) {
    View view = getPagerItem(position).initiate(mInflater, container);
    container.addView(view);
    mHolder.put(position, new WeakReference<View>(view));
    return view;/*from   ww w. ja v  a 2s .c  om*/
}

From source file:com.bison.app.ui.assist.ViewPagerAdapter.java

@Override
public Object instantiateItem(ViewGroup container, int position) {
    View itemView = onCreatePagerView(mInflater, container, position);
    container.addView(itemView);
    return itemView;
}