選擇多張圖片的控件:Patio

jopen 10年前發布 | 11K 次閱讀 Patio 圖形/圖像處理

Patio是一個簡約的Android視圖控件用于選擇多個圖像。

Patio can be added to an Activity or Fragment using the following XML

<com.andressantibanez.android.patio.Patio
  android:id="@+id/patio"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  app:thumbnailHeight="200dp"
  app:thumbnailWidth="200dp"
  app:thumbnailsContainerPadding="10dp"
  app:thumbnailsContainerBackground="#ddd"
  app:maxPictures="3"
  app:thumbnailsMessage="@string/patio_footer"
  app:actionsTextColor="#333"/>

Patio has certain customizable attributes:

  • thumbnailHeight defines the thumbnails height.
  • thumbnailWidth defines the thumbnails width.
  • thumbnailsContainerPadding defines how much padding will be used for the thumbnails container.
  • thumbnailsContainerBackground defines a background color for the thumbnails container.
  • maxPictures specifies how many pictures can the user add to the Patio view.
  • thumbnailsMessage defines a custom string for the views footer. This string can be used with %1$d and %2$d tokens to add a pictures attached / max pictures message.
  • actionsTextColor defines the text color for each action: Take Picture, Attach Picture, Remove Picture, Clear.
  • </ul>

    項目主頁:http://www.baiduhome.net/lib/view/home/1415175967262

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!