Applying Style to Elements in the Android Gallery

Is their way to apply a style resource to adjust the border of an element in a gallery class with Android?

I am trying to hide or change the default gray border color, but by the look of things is this impossible?

Any help or advice you can provide would be fantastic.

Appreciated

Tom

+3
source share
1 answer

The HelloGallery example shows how to add the default gray highlight in step 5 using a attrs.xmlfile. If you do not want a border, you can skip this step.

ImageAdapter, . , , :

public ImageAdapter(Context c) {
    mContext = c;
    TypedArray a = obtainStyledAttributes(R.styleable.HelloGallery);
    a.recycle();
}

, getView i.setBackgroundResource(mGalleryItemBackground);, .

, .

+4

Source: https://habr.com/ru/post/1747652/


All Articles