“cara mendapatkan visibilitas elemen android” Kode Jawaban

cara mendapatkan visibilitas elemen android

// simple answer for simply checking if it's VISIBLE or INVISIBLE
View.isShown()
Miss Skooter

cara mendapatkan visibilitas elemen android

//If the image is part of the layout it might be "View.VISIBLE" but 
//that doesn't mean it's within the confines of the visible screen. 
//If that's what you're after; this will work:

Rect scrollBounds = new Rect();
scrollView.getHitRect(scrollBounds);
if (imageView.getLocalVisibleRect(scrollBounds)) {
    // imageView is within the visible window
} else {
    // imageView is not within the visible window
}
Miss Skooter

Jawaban yang mirip dengan “cara mendapatkan visibilitas elemen android”

Pertanyaan yang mirip dengan “cara mendapatkan visibilitas elemen android”

Lebih banyak jawaban terkait untuk “cara mendapatkan visibilitas elemen android” di C

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya