zoukankan      html  css  js  c++  java
  • Bootstrap Thumbnail

    Square Thumbnail with Image

    <!-- Square Thumbnail with Image -->
    <com.beardedhen.androidbootstrap.BootstrapThumbnail
        android:id="@+id/thumbnailTwo"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        bootstrapthumbnail:bt_width="150dp"
        bootstrapthumbnail:bt_height="110dp"
        bootstrapthumbnail:bt_image="@drawable/image"/>
    

    The above code creates a square thumbnail with an image on the inside.

    Examples:

    alt text

    The following attributes can be added to any BootstrapThumbnail:

    bt_roundedCorners="true" True if you want round corners on the thumbnail. Default is square corners if not specified

    bt_image="@drawable/image" Specify drawable for image. If no image is specified, a default thumbnail will be created with the dimensions overlaying the thumbnail.

    bt_width="100dp" Width of thumbnail

    bt_height="75dp" Height of thumbnail

    bt_inside_padding="8dp" Thumbnail padding. I recommend to just use the default and not specify

    You can also set the image programmatically

    setImage(drawable) sets the image. Pass in a drawable

    Circle Thumbnail with Image

    <!-- Circle Thumbnail with Image -->
    <com.beardedhen.androidbootstrap.BootstrapCircleThumbnail
        android:id="@+id/thumbnailOneTest"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        bootstrap:bct_image="@drawable/headshot"
        bootstrap:bct_size="xlarge"/>
    

    The above code creates an x-large circle thumbnail with an image inside. Below is an example. The grey background will not be generated, it's just the background of the screenshot

    alt text

    The following attributes can be added to a BootstrapCircleThumbnail:

    bct_image="@drawable/image" Image to place inside

    bct_size="small" Size of thumbnail. Sizes available are: small medium large xlarge

    bct_minimal="true" Set to true if you don't want the white border.

    Example of a minimal circle thumbnail below:

    alt text

  • 相关阅读:
    企业项目化管理介绍
    企业IT架构介绍
    移动端运维体系建设
    学习型组织与企业
    css垂直居中怎么设置?文字上下居中和图片垂直居中
    情人节看看他们是怎么用微信红包示爱的
    2017年腾讯首次大规模扫号展开
    随机森林入门攻略(内含R、Python代码)
    11 Facts about Data Science that you must know
    机器学习编程语言之争,Python夺魁
  • 原文地址:https://www.cnblogs.com/boundary/p/3880761.html
Copyright © 2011-2022 走看看