Java 类android.widget.AbsListView.LayoutParams 实例源码

项目:EmotionApp    文件:EmotionGridViewAdapter.java   
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    ImageView iv_emotion = new ImageView(context);
    // 设置内边距
    iv_emotion.setPadding(itemWidth/8, itemWidth/8, itemWidth/8, itemWidth/8);
    LayoutParams params = new LayoutParams(itemWidth, itemWidth);
    iv_emotion.setLayoutParams(params);

    //判断是否为最后一个item
    if(position == getCount() - 1) {
        iv_emotion.setImageResource(R.drawable.compose_emotion_delete);
    } else {
        String emotionName = emotionNames.get(position);
        iv_emotion.setImageResource(EmotionUtils.getImgByName(emotion_map_type,emotionName));
    }

    return iv_emotion;
}
项目:letv    文件:HomeFocusView.java   
private void updataIndicaterView(int position) {
    if (BaseTypeUtils.isListEmpty(this.mFocusList) || this.mFocusList.size() == 1) {
        this.mIndicaterView.setVisibility(8);
        return;
    }
    this.mIndicaterView.setVisibility(0);
    this.mIndicaterView.removeAllViews();
    this.mIndicaterView.setPadding(0, 0, 0, UIsUtils.dipToPx(2.0f));
    LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(UIsUtils.dipToPx(4.0f), UIsUtils.dipToPx(4.0f));
    params.setMargins(UIsUtils.dipToPx(3.0f), UIsUtils.dipToPx(4.0f), UIsUtils.dipToPx(3.0f), UIsUtils.dipToPx(4.0f));
    int count = this.mFocusList.size();
    int i = 0;
    while (i < count) {
        ImageView imageView = new ImageView(this.mContext);
        imageView.setImageResource(i == position ? 2130838111 : 2130838110);
        this.mIndicaterView.addView(imageView, params);
        i++;
    }
}
项目:letv    文件:AlbumHalfCommentController.java   
private void initView() {
    this.listView = this.fragment.getListView();
    this.mCommentRedDot = (ImageView) ((Activity) this.context).findViewById(R.id.iv_comment_dot);
    this.barCommentTextView = (TextView) ((Activity) this.context).findViewById(R.id.album_half_comment_count_text);
    this.mTotalText = (TextView) ((Activity) this.context).findViewById(R.id.tv_total_text);
    this.mTotalText.setText("总评论");
    this.mTotalText.setVisibility(8);
    this.listFootView = new ChannelListFootView(this.context);
    this.listFootLayout = new LinearLayout(this.context);
    this.listFootLayout.setLayoutParams(new LayoutParams(-1, -2));
    this.listFootLayout.addView(this.listFootView);
    this.popupContentView = UIsUtils.inflate(this.context, R.layout.detailplay_half_comment_item_toast_playerlibs, null);
    this.copyTextView = (TextView) this.popupContentView.findViewById(R.id.textv_copy);
    this.adapter = this.fragment.getAdapter();
    this.listView.addFooterView(this.listFootLayout);
    this.listView.setOnScrollListener(this);
    this.adapter.setOnCommentItemListener(this);
}
项目:letv    文件:StarActivity.java   
private void initListView() {
    this.mStarAdapter = new StarAdapter(this, this.mStarName);
    this.mStarAdapter.setStarBookCallback(this.mBooedkProgramsCallback);
    this.mListView.setAdapter(this.mStarAdapter);
    DisplayMetrics displayMetrics = new DisplayMetrics();
    getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
    int screenWidth = displayMetrics.widthPixels;
    this.mListView.setHeaderLayoutParams(new LayoutParams(screenWidth, (int) (9.0f * (((float) screenWidth) / 16.0f))));
    this.mListView.setScrollViewCallbacks(this);
    ((ExpandableListView) this.mListView.getRootView()).setGroupIndicator(null);
    ((ExpandableListView) this.mListView.getRootView()).setOnGroupClickListener(new OnGroupClickListener(this) {
        final /* synthetic */ StarActivity this$0;

        {
            if (HotFix.PREVENT_VERIFY) {
                System.out.println(VerifyLoad.class);
            }
            this.this$0 = this$0;
        }

        public boolean onGroupClick(ExpandableListView expandableListView, View view, int i, long l) {
            return true;
        }
    });
}
项目:boohee_v5.6    文件:GoodsPostsFragment.java   
protected void addListener() {
    this.mHeaderView = new ImageView(getActivity());
    this.mHeaderView.setScaleType(ScaleType.CENTER_CROP);
    this.mHeaderView.setLayoutParams(new LayoutParams(-1, -2));
    ((ListView) this.mPullRefreshListView.getRefreshableView()).addHeaderView(this.mHeaderView);
    this.mAdapter = new HomeTimelineAdapter(getActivity(), this.mPosts);
    this.mPullRefreshListView.setAdapter(this.mAdapter);
    this.mPullRefreshListView.setOnRefreshListener(new OnRefreshListener<ListView>() {
        public void onRefresh(PullToRefreshBase<ListView> pullToRefreshBase) {
            GoodsPostsFragment.this.getCurrentTopic();
        }
    });
    this.mPullRefreshListView.setOnLastItemVisibleListener(new OnLastItemVisibleListener() {
        public void onLastItemVisible() {
            if (!GoodsPostsFragment.this.isLastVisible) {
                GoodsPostsFragment.this.getNextTopic();
            }
        }
    });
}
项目:boohee_v5.6    文件:ChannelPostsActivity.java   
private void findViews() {
    this.fab_button = (FloatingActionButton) findViewById(R.id.fab_button);
    this.fab_button.setVisibility(8);
    this.mHeaderView = new ImageView(this);
    this.mHeaderView.setScaleType(ScaleType.CENTER_CROP);
    this.mHeaderView.setLayoutParams(new LayoutParams(-1, -2));
    this.mPullRefreshListView = (PullToRefreshListView) findViewById(R.id.listview);
    this.mListView = (ListView) this.mPullRefreshListView.getRefreshableView();
    this.mListView.addHeaderView(this.mHeaderView);
    this.mPullRefreshListView.setOnRefreshListener(new OnRefreshListener<ListView>() {
        public void onRefresh(PullToRefreshBase<ListView> pullToRefreshBase) {
            ChannelPostsActivity.this.getCurrentTopic();
        }
    });
    this.mPullRefreshListView.setOnLastItemVisibleListener(new OnLastItemVisibleListener() {
        public void onLastItemVisible() {
            if (!ChannelPostsActivity.this.isLastVisible) {
                ChannelPostsActivity.this.getNextTopic();
            }
        }
    });
}
项目:sctalk    文件:YayaEmoGridViewAdapter.java   
public GridViewHolder() {
    try {
        LayoutParams layoutParams = new LayoutParams(
                LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
        layoutView = new LinearLayout(context);
        faceIv = new ImageView(context);
        layoutView.setLayoutParams(layoutParams);
        layoutView.setOrientation(LinearLayout.VERTICAL);
        layoutView.setGravity(Gravity.CENTER);
        LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
                105,
                115);
        params.gravity = Gravity.CENTER;
        layoutView.addView(faceIv, params);
    } catch (Exception e) {
        logger.e(e.getMessage());
    }
}
项目:sctalk    文件:EmoGridViewAdapter.java   
public GridViewHolder() {
    try {
        LayoutParams layoutParams = new LayoutParams(
                LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
        layoutView = new LinearLayout(context);
        faceIv = new ImageView(context);
        layoutView.setLayoutParams(layoutParams);
        layoutView.setOrientation(LinearLayout.VERTICAL);
        layoutView.setGravity(Gravity.CENTER);
        LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
                CommonUtil.getElementSzie(context),
                CommonUtil.getElementSzie(context));
        params.gravity = Gravity.CENTER;
        layoutView.addView(faceIv, params);
    } catch (Exception e) {
        logger.e(e.getMessage());
    }
}
项目:solved-hacking-problem    文件:cp.java   
private void m2663b() {
    if (!m2662a()) {
        if (this.f1465f == null) {
            this.f1465f = m2665d();
        }
        removeView(this.f1464e);
        addView(this.f1465f, new ViewGroup.LayoutParams(-2, -1));
        if (this.f1465f.getAdapter() == null) {
            this.f1465f.setAdapter(new cr());
        }
        if (this.f1460a != null) {
            removeCallbacks(this.f1460a);
            this.f1460a = null;
        }
        this.f1465f.setSelection(this.f1468i);
    }
}
项目:solved-hacking-problem    文件:cp.java   
private void m2663b() {
    if (!m2662a()) {
        if (this.f1465f == null) {
            this.f1465f = m2665d();
        }
        removeView(this.f1464e);
        addView(this.f1465f, new ViewGroup.LayoutParams(-2, -1));
        if (this.f1465f.getAdapter() == null) {
            this.f1465f.setAdapter(new cr());
        }
        if (this.f1460a != null) {
            removeCallbacks(this.f1460a);
            this.f1460a = null;
        }
        this.f1465f.setSelection(this.f1468i);
    }
}
项目:FMTech    文件:BindingDataAdapter.java   
public final View getView$7f88da85(int paramInt, View paramView, Data paramData)
{
  Integer localInteger = (Integer)paramData.get(this.viewResourceIdKey);
  if (localInteger == null)
  {
    ViewGenerator localViewGenerator = (ViewGenerator)paramData.get(this.viewGeneratorKey);
    if (localViewGenerator != null) {}
    for (boolean bool = true;; bool = false)
    {
      Util.checkPrecondition(bool, "Missing both view resource ID and view generator");
      return localViewGenerator.makeView$4b5572a0();
    }
  }
  View localView = this.viewHeap.get(localInteger.intValue(), paramView, new AbsListView.LayoutParams(-1, -2));
  int[] arrayOfInt = (int[])paramData.get(this.equalityFieldsKey);
  if ((localView instanceof DataView))
  {
    DataView localDataView = (DataView)localView;
    FilteredDataRow localFilteredDataRow = new FilteredDataRow(this.originalDataList, this.originalDataList.getItemId(paramInt), new LayoutResIdFilter(localInteger.intValue(), this.viewResourceIdKey), arrayOfInt);
    localFilteredDataRow.startAutoRefresh();
    localDataView.setDataRow(localFilteredDataRow);
  }
  return localView;
}
项目:FMTech    文件:PromptArrayAdapter.java   
public final View getDropDownView(int paramInt, View paramView, ViewGroup paramViewGroup)
{
  if (!isEnabled(paramInt))
  {
    if (this.mHiddenView == null)
    {
      this.mHiddenView = new View(getContext());
      this.mHiddenView.setVisibility(8);
      this.mHiddenView.setLayoutParams(new AbsListView.LayoutParams(0, 0));
    }
    return this.mHiddenView;
  }
  if (paramView == this.mHiddenView) {
    paramView = null;
  }
  return super.getDropDownView(paramInt, paramView, paramViewGroup);
}
项目:FMTech    文件:cjx.java   
protected final View b(View paramView)
{
  this.al = ((ListView)paramView.findViewById(aaw.ew));
  View localView = new View(this.bn);
  nj.a.c(localView, 2);
  localView.setLayoutParams(new AbsListView.LayoutParams(this.Z.d, this.Z.d));
  this.al.addHeaderView(localView);
  this.al.addFooterView(localView);
  this.ab = true;
  if (efj.L(this.bn)) {}
  for (int i = this.Z.d;; i = this.Z.f)
  {
    this.al.setPadding(i, 0, i, 0);
    this.al.setScrollBarStyle(33554432);
    return paramView;
  }
}
项目:PullToRefreshWeiboCommentList    文件:MainActivity.java   
private void init() {
    mListView = (ListView) findViewById(R.id.list_view);
    mHeaderContentView = new TextView(this);
    mHeaderContentView
            .setText("用嘀嘀叫车。上车后司机问你装快的了没,我说有。司机说你用这个再下一个假单我来接,我们一起赚这两个冤大头的钱。");
    mListView.addHeaderView(mHeaderContentView);
    mPlaceHolder = new View(this);
    mPlaceHolder.setLayoutParams(new LayoutParams(
            LayoutParams.MATCH_PARENT, Utils.dp2px(this, 200)));
    mPlaceHolder.setBackgroundColor(Color.BLACK);
    mListView.addHeaderView(mPlaceHolder);
    mListView.setAdapter(new ArrayAdapter<String>(this,
            android.R.layout.simple_list_item_1, items));

    mHeaderTextContentViewHeight = mHeaderContentView.getHeight();

    mStickItemView = findViewById(R.id.extend_item);
    mStickItemView.setBackgroundColor(Color.BLACK);
}
项目:KJFrameForAndroid    文件:EmojiGridAdapter.java   
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    ViewHolder holder = null;
    if (convertView == null) {
        holder = new ViewHolder();
        convertView = new ImageView(cxt);
        LayoutParams params = new LayoutParams(120, 120);
        convertView.setLayoutParams(params);
        convertView.setPadding(10, 10, 10, 10);
        holder.image = (ImageView) convertView;
        convertView.setTag(holder);
    } else {
        holder = (ViewHolder) convertView.getTag();
    }
    holder.image.setImageResource(datas.get(position).getResId());
    return convertView;
}
项目:EasyDice    文件:DieViewDieHandAdapter.java   
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    Die die = getDie(position);
    boolean selected = getSelected(position);
    if (null == die) {
        return null;
    }
    DieView dieView = (DieView) convertView;
    if (null == dieView) {
        dieView = new DieView(getContext());
        int px = dpToPx(dieView, 66);
        dieView.setLayoutParams(new AbsListView.LayoutParams(LayoutParams.MATCH_PARENT, px));
    }
    dieView.setDie(die);
    dieView.setSelected(selected);
    return dieView;
}
项目:p1-android    文件:LikerFragment.java   
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);

    View view = inflater.inflate(R.layout.likers_fragment_layout,
            container, false);
    initActionBar(inflater, view);
    mListHeaderView = new View(getActivity());
    mListHeaderView
            .setLayoutParams(new LayoutParams(
                    AbsListView.LayoutParams.MATCH_PARENT,
                    (int) getActivity().getResources().getDimension(
                            R.dimen.actionbar_height)));

    mProgressBar = view.findViewById(R.id.progressbar);
    mErrorMessage = view.findViewById(R.id.error_message);
    mErrorMessage.setVisibility(View.GONE);
    return view;
}
项目:letv    文件:FirstPageFragment.java   
private void addFootLetvImageView() {
    if (this.mLetvImageView == null) {
        this.mLetvImageView = new ImageView(getActivity());
    }
    this.mLetvImageView.setLayoutParams(new LayoutParams(-1, -2));
    this.mLetvImageView.setPadding(0, UIsUtils.zoomWidth(10), 0, UIsUtils.zoomWidth(16));
    this.mLetvImageView.setImageResource(2130838157);
    this.mLetvImageView.setScaleType(ScaleType.CENTER);
    if (this.mListView != null) {
        this.mListView.addFooterView(this.mLetvImageView);
    }
}
项目:letv    文件:MineFragment.java   
private void initUI() {
    int i;
    this.mMineListView = (ListView) this.mMineRootLayout.findViewById(R.id.my_list_view);
    this.mHeadLayout = PublicLoadLayout.inflate(getActivity(), R.layout.mine_head_layout, null);
    this.mRoundHead = (RoundImageView) this.mHeadLayout.findViewById(R.id.btn_head_login);
    this.mTitle = (TextView) this.mHeadLayout.findViewById(R.id.head_login_title);
    this.mSubTitle = (TextView) this.mHeadLayout.findViewById(R.id.head_login_subtitle);
    this.mSubTitleOther = (TextView) this.mHeadLayout.findViewById(R.id.head_login_subtitle_other);
    this.mHeadLoginLayout = this.mHeadLayout.findViewById(R.id.layout_head_login);
    this.mMessageIcon = (RelativeLayout) this.mHeadLayout.findViewById(R.id.message_icon);
    this.mNewMessageIcon = (ImageView) this.mHeadLayout.findViewById(R.id.new_message_title);
    ImageView imageView = this.mNewMessageIcon;
    if (this.mIsNewMessageVisible) {
        i = 0;
    } else {
        i = 8;
    }
    imageView.setVisibility(i);
    this.mHeadLayout.findViewById(R.id.title_main_search).setVisibility(8);
    this.mMineListView.addHeaderView(this.mHeadLayout);
    View mFooterView = new View(getActivity());
    mFooterView.setLayoutParams(new LayoutParams(-1, UIsUtils.zoomWidth(15)));
    mFooterView.setBackgroundColor(getActivity().getResources().getColor(2131493362));
    this.mMineListView.addFooterView(mFooterView);
    this.mMineListViewAdapter = new MineListViewAdapter(getActivity());
    this.mMineListView.setAdapter(this.mMineListViewAdapter);
    this.mRoundHead.setOnClickListener(this);
    this.mHeadLoginLayout.setOnClickListener(this);
    this.mMessageIcon.setOnClickListener(this);
    showDefaultProfileList();
}
项目:letv    文件:StarRankActivity.java   
private void initListView() {
    this.mStarRankAdapter = new StarRankAdapter(this.mContext);
    this.mListView.setAdapter(this.mStarRankAdapter);
    this.mListView.setHeaderLayoutParams(new LayoutParams(UIsUtils.getScreenWidth(), (int) (9.0f * (((float) UIsUtils.getScreenWidth()) / 16.0f))));
    this.mListView.setScrollViewCallbacks(this);
    ((ExpandableListView) this.mListView.getRootView()).setGroupIndicator(null);
    ((ExpandableListView) this.mListView.getRootView()).setOnGroupClickListener(null);
}
项目:letv    文件:LiveSubTypeActivity.java   
private void addHeaderView() {
    if (this.mListView != null && this.mListView.getHeaderViewsCount() == 1) {
        this.mHeaderView = new RelativeLayout(this);
        this.mHeaderView.setLayoutParams(new LayoutParams(-1, -2));
        this.mPlayerView = new LivePlayerView(this);
        this.mPlayerView.init(this.pageIndex, getSupportFragmentManager());
        this.mHeaderView.addView(this.mPlayerView, new RelativeLayout.LayoutParams(-1, -1));
        UIsUtils.zoomView(320, 180, this.mHeaderView);
        this.mListView.addHeaderView(this.mHeaderView);
    }
}
项目:letv    文件:LiveSubTypeActivity.java   
private void addFooterView() {
    if (this.mFooterView == null) {
        this.mFooterView = new ImageView(getActivity());
        LayoutParams l = new LayoutParams(-1, Math.min(UIsUtils.getScreenHeight(), UIsUtils.getScreenWidth()) / 6);
        this.mFooterView.setImageResource(2130838157);
        this.mFooterView.setLayoutParams(l);
        this.mFooterView.setBackgroundColor(getActivity().getResources().getColor(2131492949));
        this.mFooterView.setPadding(0, UIsUtils.zoomWidth(5), 0, UIsUtils.zoomWidth(10));
        this.mFooterView.setScaleType(ScaleType.CENTER);
    }
    if (this.mListView.getFooterViewsCount() == 0) {
        this.mListView.addFooterView(this.mFooterView);
    }
}
项目:letv    文件:LiveSubTypeActivity.java   
protected void handleFullScreenEvent(FullScreenBtnClickEvent fullScreenEvent) {
    this.mFullScreen = fullScreenEvent.isFull;
    setRedPacketEntryLocation(fullScreenEvent.isFull);
    if (fullScreenEvent.isFull) {
        if (this.mPlayerView != null) {
            getActivity().setRequestedOrientation(0);
            this.mLayoutContainer.setVisibility(0);
            ((ViewGroup) this.mPlayerView.getParent()).removeView(this.mPlayerView);
            this.mLayoutContainer.addView(this.mPlayerView, new ViewGroup.LayoutParams(-1, -1));
            UIsUtils.zoomViewFull(this.mPlayerView);
            UIsUtils.fullScreen(getActivity());
        }
        this.mFullScreenBtn.setImageResource(2130838715);
        return;
    }
    if (this.mPlayerView != null) {
        getActivity().setRequestedOrientation(1);
        this.mLayoutContainer.removeAllViews();
        this.mLayoutContainer.setVisibility(8);
        if (this.mHeaderView != null) {
            this.mHeaderView.addView(this.mPlayerView);
        }
        UIsUtils.zoomView(320, 180, this.mPlayerView);
        UIsUtils.cancelFullScreen(getActivity());
    }
    this.mFullScreenBtn.setImageResource(2130838126);
}
项目:boohee_v5.6    文件:DayPickerView.java   
public void init(Context context) {
    this.mHandler = new Handler();
    setLayoutParams(new LayoutParams(-1, -1));
    setDrawSelectorOnTop(false);
    this.mContext = context;
    setUpListView();
}
项目:boohee_v5.6    文件:PinnedSectionListView.java   
private void createPinnedShadow(int position) {
    int heightMode;
    int heightSize;
    PinnedViewShadow pinnedShadow = this.mRecycleShadow;
    View recycleView = pinnedShadow == null ? null : pinnedShadow.view;
    this.mRecycleShadow = null;
    View pinnedView = getAdapter().getView(position, recycleView, this);
    LayoutParams layoutParams = (LayoutParams) pinnedView.getLayoutParams();
    if (layoutParams == null) {
        heightMode = Integer.MIN_VALUE;
        heightSize = getHeight();
    } else {
        heightMode = MeasureSpec.getMode(layoutParams.height);
        heightSize = MeasureSpec.getSize(layoutParams.height);
    }
    if (heightMode == 0) {
        heightMode = 1073741824;
    }
    int maxHeight = (getHeight() - getListPaddingTop()) - getListPaddingBottom();
    if (heightSize > maxHeight) {
        heightSize = maxHeight;
    }
    pinnedView.measure(MeasureSpec.makeMeasureSpec((getWidth() - getListPaddingLeft()) -
            getListPaddingRight(), 1073741824), MeasureSpec.makeMeasureSpec(heightSize,
            heightMode));
    pinnedView.layout(0, 0, pinnedView.getMeasuredWidth(), pinnedView.getMeasuredHeight());
    this.mTranslateY = 0;
    if (pinnedShadow == null) {
        pinnedShadow = new PinnedViewShadow();
    }
    pinnedShadow.position = position;
    pinnedShadow.view = pinnedView;
    this.mPinnedShadow = pinnedShadow;
}
项目:boohee_v5.6    文件:ImageGridAdapter.java   
public ImageGridAdapter(Context context, boolean showCamera, int mMaxImageNum) {
    this.mMaxImageNum = mMaxImageNum;
    this.mActivity = (MultiImageSelectorActivity) context;
    this.mInflater = (LayoutInflater) context.getSystemService("layout_inflater");
    this.showCamera = showCamera;
    this.mItemLayoutParams = new LayoutParams(-1, -1);
    this.mImageLoader = MultiImageSelector.getImageLoader();
}
项目:boohee_v5.6    文件:ImageGridAdapter.java   
public void setItemSize(int columnWidth) {
    if (this.mItemSize != columnWidth) {
        this.mItemSize = columnWidth;
        this.mItemLayoutParams = new LayoutParams(this.mItemSize, this.mItemSize);
        notifyDataSetChanged();
    }
}
项目:boohee_v5.6    文件:ImageGridAdapter.java   
public View getView(int i, View view, ViewGroup viewGroup) {
    int type = getItemViewType(i);
    if (type == 0) {
        view = this.mInflater.inflate(R.layout.list_item_camera, viewGroup, false);
        view.setTag(null);
    } else if (type == 1) {
        ViewHolde holde;
        if (view == null) {
            view = this.mInflater.inflate(R.layout.list_item_image, viewGroup, false);
            holde = new ViewHolde(view);
        } else {
            holde = (ViewHolde) view.getTag();
            if (holde == null) {
                view = this.mInflater.inflate(R.layout.list_item_image, viewGroup, false);
                holde = new ViewHolde(view);
            }
        }
        holde.bindData(getItem(i));
        ImageView imageView = holde.indicator;
        if (this.showCamera) {
            i--;
        }
        imageView.setOnClickListener(new CheckClickListener(i));
    }
    if (((LayoutParams) view.getLayoutParams()).height != this.mItemSize) {
        view.setLayoutParams(this.mItemLayoutParams);
    }
    return view;
}
项目:GCSApp    文件:ImageGridFragment.java   
/**
 * Sets the item height. Useful for when we know the column width so the
 * height can be set to match.
 * 
 * @param height
 */
public void setItemHeight(int height) {
    if (height == mItemHeight) {
        return;
    }
    mItemHeight = height;
    mImageViewLayoutParams = new RelativeLayout.LayoutParams(
            LayoutParams.MATCH_PARENT, mItemHeight);
    mImageResizer.setImageSize(height);
    notifyDataSetChanged();
}
项目:sctalk    文件:EmoGridViewAdapter.java   
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    try {
        GridViewHolder gridViewHolder = null;
        if (null == convertView && null != context) {
            gridViewHolder = new GridViewHolder();
            convertView = gridViewHolder.layoutView;
            if (convertView != null) {
                convertView.setTag(gridViewHolder);
            }
        } else {
            gridViewHolder = (GridViewHolder) convertView.getTag();
        }
        if (null == gridViewHolder || null == convertView) {
            return null;
        }
        gridViewHolder.faceIv.setImageBitmap(getBitmap(position));

        if (position == emoResIds.length - 1) {
            LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
                    LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
            params.topMargin = CommonUtil.getElementSzie(context) / 3;
            gridViewHolder.faceIv.setLayoutParams(params);
        }
        return convertView;
    } catch (Exception e) {
        logger.e(e.getMessage());
        return null;
    }
}
项目:TAG    文件:ImageGridFragment.java   
/**
 * Sets the item height. Useful for when we know the column width so the
 * height can be set to match.
 * 
 * @param height
 */
public void setItemHeight(int height) {
    if (height == mItemHeight) {
        return;
    }
    mItemHeight = height;
    mImageViewLayoutParams = new RelativeLayout.LayoutParams(
            LayoutParams.MATCH_PARENT, mItemHeight);
    mImageResizer.setImageSize(height);
    notifyDataSetChanged();
}
项目:solved-hacking-problem    文件:cp.java   
private ct m2660a(C0214d c0214d, boolean z) {
    ct ctVar = new ct(this, getContext(), c0214d, z);
    if (z) {
        ctVar.setBackgroundDrawable(null);
        ctVar.setLayoutParams(new LayoutParams(-1, this.f1467h));
    } else {
        ctVar.setFocusable(true);
        if (this.f1463d == null) {
            this.f1463d = new cs();
        }
        ctVar.setOnClickListener(this.f1463d);
    }
    return ctVar;
}
项目:solved-hacking-problem    文件:cp.java   
private boolean m2664c() {
    if (m2662a()) {
        removeView(this.f1465f);
        addView(this.f1464e, new ViewGroup.LayoutParams(-2, -1));
        setTabSelected(this.f1465f.getSelectedItemPosition());
    }
    return false;
}
项目:solved-hacking-problem    文件:cp.java   
private ct m2660a(C0214d c0214d, boolean z) {
    ct ctVar = new ct(this, getContext(), c0214d, z);
    if (z) {
        ctVar.setBackgroundDrawable(null);
        ctVar.setLayoutParams(new LayoutParams(-1, this.f1467h));
    } else {
        ctVar.setFocusable(true);
        if (this.f1463d == null) {
            this.f1463d = new cs();
        }
        ctVar.setOnClickListener(this.f1463d);
    }
    return ctVar;
}
项目:solved-hacking-problem    文件:cp.java   
private boolean m2664c() {
    if (m2662a()) {
        removeView(this.f1465f);
        addView(this.f1464e, new ViewGroup.LayoutParams(-2, -1));
        setTabSelected(this.f1465f.getSelectedItemPosition());
    }
    return false;
}
项目:RefreshTabView    文件:Tab1ListFragment.java   
private void listViewAddHeader() {
    placeHolderView = new LinearLayout(getActivity());
    AbsListView.LayoutParams params = new LayoutParams(AbsListView.LayoutParams.MATCH_PARENT, getResources()
            .getDimensionPixelSize(R.dimen.max_header_height));
    placeHolderView.setLayoutParams(params);
    listView.getRefreshableView().addHeaderView(placeHolderView);
}
项目:RefreshTabView    文件:Tab3ListFragment.java   
private void listViewAddHeader() {
    placeHolderView = new LinearLayout(getActivity());
    AbsListView.LayoutParams params = new LayoutParams(AbsListView.LayoutParams.MATCH_PARENT, getResources()
            .getDimensionPixelSize(R.dimen.max_header_height));
    placeHolderView.setLayoutParams(params);
    listView.getRefreshableView().addHeaderView(placeHolderView);
}
项目:RefreshTabView    文件:Tab2ListFragment.java   
private void listViewAddHeader() {
    placeHolderView = new LinearLayout(getActivity());
    AbsListView.LayoutParams params = new LayoutParams(AbsListView.LayoutParams.MATCH_PARENT, getResources()
            .getDimensionPixelSize(R.dimen.max_header_height));
    placeHolderView.setLayoutParams(params);
    listView.getRefreshableView().addHeaderView(placeHolderView);
}
项目:BigApp_WordPress_Android    文件:AdapterMediaShow.java   
public AdapterMediaShow(Context context, int mediaType,
        ArrayList<MediaInfo> selectedMedias) {
    if (selectedMedias != null) {
        mSelectedMedias.addAll(selectedMedias);
    }
    this.context = context;
    this.MediaType = mediaType;
    this.inflate = LayoutInflater.from(context);
    this.mImageLoader = ViewerImageLoader.getInstance();
    mParams = new LayoutParams(getThumbWidth(), getThumbWidth());
}
项目:ChatDemoUI3.0    文件:ImageGridFragment.java   
/**
 * Sets the item height. Useful for when we know the column width so the
 * height can be set to match.
 * 
 * @param height
 */
public void setItemHeight(int height) {
    if (height == mItemHeight) {
        return;
    }
    mItemHeight = height;
    mImageViewLayoutParams = new RelativeLayout.LayoutParams(
            LayoutParams.MATCH_PARENT, mItemHeight);
    mImageResizer.setImageSize(height);
    notifyDataSetChanged();
}