Example usage for android.widget LinearLayout LinearLayout

List of usage examples for android.widget LinearLayout LinearLayout

Introduction

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

Prototype

public LinearLayout(Context context, @Nullable AttributeSet attrs) 

Source Link

Usage

From source file:com.davis.kangpinhui.views.viewpagerindicator.ScrollPageIndicator.java

public ScrollPageIndicator(Context context, AttributeSet attrs) {
    super(context, attrs);
    setHorizontalScrollBarEnabled(false);
    mTabLayout = new LinearLayout(context, attrs);
    ColorDrawable colorDrawable = new ColorDrawable(Color.WHITE);
    mTabLayout.setDividerDrawable(colorDrawable);
    addView(mTabLayout, new ViewGroup.LayoutParams(WRAP_CONTENT, MATCH_PARENT));
    density = context.getResources().getDisplayMetrics().density;
}

From source file:com.garethlewis.eagles.tabs.TabPageIndicator.java

public TabPageIndicator(Context context, AttributeSet attrs) {
    super(context, attrs);
    setHorizontalScrollBarEnabled(false);

    mTabLayout = new LinearLayout(context, attrs);
    addView(mTabLayout, new ViewGroup.LayoutParams(WRAP_CONTENT, MATCH_PARENT));
}