Загрузка...

How to rotate the picture in ImageView of your Android app?

This video shows the steps to rotate the pictures in the image view of your Android App. It uses the SetRotation property of the ImageView to rotate the image. I hope you like this video. For any questions, suggestions or appreciation please contact us at: https://programmerworld.co/contact/ or email at: programmerworld1990@gmail.com Complete source code and other details/ steps of this video are posted in the below link: https://programmerworld.co/android/how-to-rotate-the-picture-in-imageview-of-your-android-app/ However, the main Java code is copied below also for reference: package com.programmerworld.rotateimageview; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.ImageView; public class MainActivity extends AppCompatActivity { private ImageView imageView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); imageView = findViewById(R.id.imageView); } public void buttonRotateLeft(View view){ imageView.setRotation(imageView.getRotation() - 90F); } public void buttonRotateRight(View view){ imageView.setRotation(imageView.getRotation() + 90F); } } --

Видео How to rotate the picture in ImageView of your Android app? автора Sensational Android TV Experiences
Страницу в закладки Мои закладки
Все заметки Новая заметка Страницу в заметки