Search in sources :

Example 11 with LinearLayout

use of android.widget.LinearLayout in project SpringIndicator by chenupt.

the class SpringIndicator method addTabContainerView.

private void addTabContainerView() {
    tabContainer = new LinearLayout(getContext());
    tabContainer.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT, 1.0f));
    tabContainer.setOrientation(LinearLayout.HORIZONTAL);
    tabContainer.setGravity(Gravity.CENTER);
    addView(tabContainer);
}
Also used : LinearLayout(android.widget.LinearLayout)

Example 12 with LinearLayout

use of android.widget.LinearLayout in project Libraries-for-Android-Developers by eoecn.

the class MenuItemImpl method setActionView.

public MenuItem setActionView(int resId) {
    final Context context = mMenu.getContext();
    final LayoutInflater inflater = LayoutInflater.from(context);
    setActionView(inflater.inflate(resId, new LinearLayout(context), false));
    return this;
}
Also used : Context(android.content.Context) LayoutInflater(android.view.LayoutInflater) LinearLayout(android.widget.LinearLayout)

Example 13 with LinearLayout

use of android.widget.LinearLayout in project android-app by eoecn.

the class XListViewFooter method initView.

private void initView(Context context) {
    mContext = context;
    LinearLayout moreView = (LinearLayout) LayoutInflater.from(mContext).inflate(R.layout.xlistview_footer, null);
    addView(moreView);
    moreView.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
    mContentView = moreView.findViewById(R.id.xlistview_footer_content);
    mProgressBar = moreView.findViewById(R.id.xlistview_footer_progressbar);
    mHintView = (TextView) moreView.findViewById(R.id.xlistview_footer_hint_textview);
}
Also used : LinearLayout(android.widget.LinearLayout)

Example 14 with LinearLayout

use of android.widget.LinearLayout in project android-app by eoecn.

the class XListViewHeader method initView.

private void initView(Context context) {
    // 初始情况,设置下拉刷新view高度为0
    LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, 0);
    mContainer = (LinearLayout) LayoutInflater.from(context).inflate(R.layout.xlistview_header, null);
    addView(mContainer, lp);
    setGravity(Gravity.BOTTOM);
    mArrowImageView = (ImageView) findViewById(R.id.xlistview_header_arrow);
    mHintTextView = (TextView) findViewById(R.id.xlistview_header_hint_textview);
    mProgressBar = (ProgressBar) findViewById(R.id.xlistview_header_progressbar);
    mRotateUpAnim = new RotateAnimation(0.0f, -180.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
    mRotateUpAnim.setDuration(ROTATE_ANIM_DURATION);
    mRotateUpAnim.setFillAfter(true);
    mRotateDownAnim = new RotateAnimation(-180.0f, 0.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
    mRotateDownAnim.setDuration(ROTATE_ANIM_DURATION);
    mRotateDownAnim.setFillAfter(true);
}
Also used : RotateAnimation(android.view.animation.RotateAnimation) LinearLayout(android.widget.LinearLayout)

Example 15 with LinearLayout

use of android.widget.LinearLayout in project Libraries-for-Android-Developers by eoecn.

the class XListViewHeader method initView.

private void initView(Context context) {
    // 初始情况,设置下拉刷新view高度为0
    LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, 0);
    mContainer = (LinearLayout) LayoutInflater.from(context).inflate(R.layout.xlistview_header, null);
    addView(mContainer, lp);
    setGravity(Gravity.BOTTOM);
    mArrowImageView = (ImageView) findViewById(R.id.xlistview_header_arrow);
    mHintTextView = (TextView) findViewById(R.id.xlistview_header_hint_textview);
    mProgressBar = (ProgressBar) findViewById(R.id.xlistview_header_progressbar);
    mRotateUpAnim = new RotateAnimation(0.0f, -180.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
    mRotateUpAnim.setDuration(ROTATE_ANIM_DURATION);
    mRotateUpAnim.setFillAfter(true);
    mRotateDownAnim = new RotateAnimation(-180.0f, 0.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
    mRotateDownAnim.setDuration(ROTATE_ANIM_DURATION);
    mRotateDownAnim.setFillAfter(true);
}
Also used : RotateAnimation(android.view.animation.RotateAnimation) LinearLayout(android.widget.LinearLayout)

Aggregations

LinearLayout (android.widget.LinearLayout)1171 View (android.view.View)457 TextView (android.widget.TextView)435 ViewGroup (android.view.ViewGroup)200 ImageView (android.widget.ImageView)189 Button (android.widget.Button)164 ScrollView (android.widget.ScrollView)123 ListView (android.widget.ListView)97 LayoutInflater (android.view.LayoutInflater)86 FrameLayout (android.widget.FrameLayout)85 Context (android.content.Context)74 AdapterView (android.widget.AdapterView)71 EditText (android.widget.EditText)69 Intent (android.content.Intent)58 AbsListView (android.widget.AbsListView)58 LayoutParams (android.widget.LinearLayout.LayoutParams)48 RelativeLayout (android.widget.RelativeLayout)48 Bitmap (android.graphics.Bitmap)45 OnClickListener (android.view.View.OnClickListener)44 Drawable (android.graphics.drawable.Drawable)42