Set ImageView width and height programmatically on a widget

后端 未结 3 2182
梦如初夏
梦如初夏 2020-12-30 06:17

I am using below code to set an image on a widget imageview using remoteview now i want to set height and width to imageview runtime.

if (appWidgetId != AppW         


        
3条回答
  •  滥情空心
    2020-12-30 06:31

    hi try these line to set imageview width and height

    image_view.getLayoutParams().height = 20;
    
    image_view.getLayoutParams().width = 100;
    

提交回复
热议问题