I am working on an app which displays an image in the center. The xml code of the ImageView is below
<ImageView
android:id="@+id/e_sym"
android:layout_width="300px"
android:layout_height="300px"
android:rotation="0"
android:contentDescription="@string/symbol_e"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.499"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.498"
app:srcCompat="@drawable/symbol_e" />
I want to change the height and width from the java program on click of button.
decr.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//code to change height and width values of the ImageView
}
});
The size has to be in pixel format