I'm using a ImageView with a fixed size for adding an icon to a menu. In my application, I use it a lot of times, but on this ImageView the Layout Params seem to not work.
Unlike the others ImageViews, in this case, I'm using a template directly, but I think that's not the problem.
<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="1dp"
android:layout_height="1dp"
android:scaleType="fitCenter"
android:src="@drawable/ic_menu_moreoverflow_normal_holo_dark"
android:contentDescription="ICON" />
Its been used in code as follows.
ImageView iview =(ImageView) View.inflate(context, R.layout.icon, null);
Theoretically, It should resize automatically the image, however, the images continues with the original size, although the size was 1dp. Where is the problem? Thanks a lot!