Android AbsListView.LayoutParams - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android AbsListView.LayoutParams class.

This code example shows how to use the following methods:
	 */ 
	@Override 
	public View getView(int position, View convertView, ViewGroup parent) { 
		CheckBoxView cv = new CheckBoxView(getItem(position), mContext, 
				mLabeler, mOnItemClickListener, position); 
		LayoutParams params = new LayoutParams(LayoutParams.FILL_PARENT, 
				LayoutParams.FILL_PARENT); 
		cv.setLayoutParams(params); 
		return cv; 
	} 
 
	/** 
	 * Sets the click listener for the object's line. 
	 *  
	 * @param itemClickListener 
	 *            The listener on the object's line. 
	 */ 
	public void setOnCheckBoxClickListener(OnItemClickListener itemClickListener) { 
		mOnItemClickListener = itemClickListener; 
	} 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
	@Override 
	public View getView(int position, View convertView, ViewGroup parent) { 
		CheckBoxesView cv = new CheckBoxesView(getItem(position), mContext, 
				mLabeler, mOnItemClickListener, position); 
 
		LayoutParams params = new LayoutParams(LayoutParams.FILL_PARENT, 
				LayoutParams.FILL_PARENT); 
		cv.setLayoutParams(params); 
		return cv; 
	} 
 
	/** 
	 * Sets the listener for the object's line. 
	 *  
	 * @param itemClickListener 
	 *            The Listener on the object's line. 
	 */ 
	public void setOnCheckBoxClickListener(OnItemClickListener itemClickListener) { 
		mOnItemClickListener = itemClickListener; 
	} 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
	 */ 
	@Override 
	public View getView(int position, View convertView, ViewGroup parent) { 
		PreferencesView rv = new PreferencesView(getItem(position), mContext, 
				mLabeler, mPrefName, mOnItemClickListener, position); 
		LayoutParams params = new LayoutParams(LayoutParams.FILL_PARENT, 
				LayoutParams.FILL_PARENT); 
		rv.setLayoutParams(params); 
		return rv; 
	} 
 
	/** 
	 * Sets the <code>CheckBox</code> listener on the object's line. 
	 *  
	 * @param itemClickListener 
	 *            The listener on the object's line. 
	 */ 
	public void setOnCheckBoxClickListener(OnItemClickListener itemClickListener) { 
		mOnItemClickListener = itemClickListener; 
	} 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
			return myText;
		} 
 
		private TextView createView(String content) {
			// TODO Auto-generated method stub 
			AbsListView.LayoutParams params = new AbsListView.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, 80);
			TextView myText = new TextView(MainActivity.this);
			myText.setLayoutParams(params);
			myText.setGravity(Gravity.CENTER_VERTICAL| Gravity.LEFT );
			myText.setPadding(80, 0, 0, 0);
			myText.setText(content);
			return myText;
		} 
 
		@Override 
		public int getChildrenCount(int groupPosition) {
			// TODO Auto-generated method stub 
			return ChildrenData.get(groupPosition).size();
		} 
 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
     * create root for item of ListView 
     */ 
    protected ViewGroup createRoot(){
        LinearLayout root = new LinearLayout(mContext);
        root.setOrientation(LinearLayout.HORIZONTAL);
        LayoutParams lp = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
        root.setLayoutParams(lp);
        return root;
    } 
     
    private boolean setOnItemClickListenerIfNeed(View child,int pos,int realPos) {
        if(mGridListener == null){
            return false; 
        } 
        child.setOnClickListener(this);
        child.setTag(R.id.pos, pos);
        child.setTag(R.id.realPos, realPos);
        return true; 
    } 
     
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
	public View getView(int position, View view, ViewGroup group) {
		PlayerScore playerScore = getItem(position);
 
		LinearLayout layout = new LinearLayout(context);
		layout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
				LayoutParams.FILL_PARENT));
		layout.setOrientation(LinearLayout.HORIZONTAL);
 
		TextView name = new TextView(context);
		name.setText(playerScore.getPlayer().getName());
		name.setGravity(Gravity.LEFT + Gravity.CENTER_VERTICAL);
		name.setTextSize(new ActivityUtils().getAdapterFontSize());
		name.setPadding(new ActivityUtils().getAdapterHorizontalPadding(),
				new ActivityUtils().getAdapterVerticalPadding(), 
				new ActivityUtils().getAdapterHorizontalPadding(), 
				new ActivityUtils().getAdapterVerticalPadding()); 
 
		TextView score = new TextView(context);
		score.setText(String.valueOf(playerScore.getScore()));
		score.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 
    @SuppressWarnings("deprecation") 
	public View getView(int position, View convertView, ViewGroup parent) {
        final Button b;
         
        LayoutParams lp = new LayoutParams(LayoutParams.MATCH_PARENT, 150);
         
         
        if (convertView == null) {
            b = new Button(mContext);
            b.setLayoutParams(lp);            
            b.setPadding(12, 12, 12, 12);
            b.setTextSize(20f);      
        } else { 
            b = (Button) convertView;
        } 
         
        final GradientColor gd = Gradients.AllGradients().get(position);
         
        int firstColor = gd.getColorA();
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 
        final Drawable divider = getDivider();
        if (mShowTopDivider && divider != null) {
            final int dividerHeight = getDividerHeight();
            final View view = new View(getContext());
            view.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, dividerHeight));
            addHeaderView(view);
        } 
    } 
 
    @Override 
    public void onDetachedFromWindow() { 
        super.onDetachedFromWindow(); 
 
        mUrlOpenListener = null;
    } 
 
    @Override 
    public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
        Object item = parent.getItemAtPosition(position);
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
	private LayoutParams layoutParam;
    public HintLetterAdapter(Context androidContext,char[] letters,int offset,HintStyle hintStyle) {
        this.androidContext = androidContext;
        this.letters=letters;
        this.offset = offset;
        layoutParam= new LayoutParams(hintStyle.getWidth(), hintStyle.getHeight());
      int[] attrs = {android.R.attr.textSize};     
             
    } 
 
    public int getHintLetterWidth() { 
		return hintLetterWidth;
	} 
 
	public void setHintLetterWidth(int hintLetterWidth) {
		this.hintLetterWidth = hintLetterWidth;
	} 
 
	public int getHintLetterHeight() { 
		return hintLetterHeight;
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 
    @Override 
    public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent)
    { 
        TextView textView = new TextView(this.locationsActivity);
        textView.setLayoutParams(new LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
        textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT);
        textView.setTextSize(20f);
        textView.setTextColor(Color.WHITE);
        textView.setPadding(60, 20, 0, 20);
        textView.setText(((Node) this.getChild(groupPosition, childPosition)).getNodeName());
        return textView;
    } 
 
    @Override 
    public int getChildrenCount(int groupPosition)
    { 
        return HubController.locationsActivityController.getChildren().get(groupPosition).size();
    } 
 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java

Related Android AbsListView.LayoutParams Questions & Answers:

Other Android AbsListView.LayoutParams Examples

47:	        imageView.setImageResource(mThumbIds[position]);
48:	        imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
49:	        imageView.setLayoutParams(new GridView.LayoutParams(70, 70));
50:	        return imageView;
51:		}

Read More

60:	
61:			imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
62:			imageView.setLayoutParams(new GridView.LayoutParams(imageWidth,
63:					imageWidth));
64:			imageView.setImageBitmap(image);

Read More

23:	        if (convertView == null) {  // if it's not recycled, initialize some attributes
24:	            imageView = new ImageView(mContext);
25:	            imageView.setLayoutParams(new GridView.LayoutParams(85, 85));
26:	            imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
27:	            imageView.setPadding(8, 8, 8, 8);

Read More

See Code Examples for Android AbsListView.LayoutParams Methods: