简体   繁体   中英

custom border frame for Gallery widget

Is there a way to define/customize a border around the currently selected Gallery item? I know, i can create a Drawable and draw four lines into that but there must be a simpler way.

In the past I did the following:

<LinearLayout android:id="@+id/group_info"
          android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:background="@drawable/list">

@drawable/list is a 9patch. Inside the LinearLayout I added a View with the proper margin.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM