Skip to content

when single image make width to match_parent. #17

@The-RobinHood

Description

@The-RobinHood

Hello,

Can it be possible to make image width to match_parent( same as device width) when there is only one image in list? I just apply below code but no luck.

        int imgWidth = width[0] * (int) mContext.getResources().getDisplayMetrics().density;
        int imagHeight = height[0] * (int) mContext.getResources().getDisplayMetrics().density;
        int height = (deviceWidth * imagHeight) / imgWidth;

       holder.imageView.getLayoutParams().height = height;
        holder.imageView.getLayoutParams().width = deviceWidth;

device-2016-04-08-121748

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions