Skip to main content

All Questions

Tagged with
24 questions with no upvoted or accepted answers
3 votes
0 answers
1k views

Android tab activity View visibility change event

What is the event dispatched to a View when its visibility changes? I have a custom View that is attached to a tab. When my custom View becomes invisible because the user switches to other tabs, I ...
harry lee's user avatar
2 votes
2 answers
294 views

Setvisibility doesn't work on Buttons

I have a bunch of buttons aligned in a TableLayout in different rows. So when I go through them in a loop and call btn.setVisibility(View.INVISIBLE) some of them get hidden, but others don't. And it ...
Turkhan Badalov's user avatar
1 vote
1 answer
337 views

Identify first visible view inside viewgroup

I have several TextViews inside ConstraintLayout. The visibility of those TextViews are set at runtime based upon the data availability. I need to bold the text of the first visible TextView. I have ...
skafle's user avatar
  • 935
1 vote
0 answers
244 views

Multi floating button in coordinatorlayout in accordance with a bottom view's visibility

I have a big problem to position 3 floating buttons in a coordinatorlayout. The problem came from 3 other views, which could be visible or gone. On the previous screens, you can see 3 possibilities: ...
Turvy's user avatar
  • 1,002
1 vote
1 answer
429 views

How to know when a view is visible on the screen?

How to know when a view is actually visible on screen? View.getVisibility is not accurate enough for my case. It gets set to true before the view is completely rendered. Specifically, I'm using a ...
Son Nguyen's user avatar
  • 1,504
1 vote
0 answers
859 views

View.setVisibility(View.Gone) doesn't work anymore

I have a problem. view.setVisibility(View.GONE) doesn't work for me anymore. I will show you what I'm working on. I globally declared this outside of OnCreate() : final ArrayList<View> ...
kalu's user avatar
  • 169
1 vote
2 answers
897 views

Why is my View.setVisibility(View.INVISIBLE) method not working on time?

I'm working on my Android demo which will launch a floating window when certain button is clicked. Then, by clicking the floating window the window itself will hide until the screenshot of current ...
Pan.'s user avatar
  • 67
1 vote
0 answers
18 views

View Visibility Updates Only Occur if singleInstance is Used Over singleTask, Why?

So I'm making a launcher. I have the LauncherActivity and inside it there's a inner class which extends PrefWatcher to monitor a SharedPreference change. This PrefWatcher adjusts the layout of ...
AutoM8R's user avatar
  • 3,070
1 vote
0 answers
618 views

How to update a FrameLayout with a AlertDialog open?

I need to update a text View and turn it visible with the text inputed on an AlertDialog, the problem is, after update and change from GONE to VISIBLE I want to save my FrameLayout as image, and share ...
Fernando Bonet's user avatar
1 vote
0 answers
129 views

Android CustomView behave abnormal

I am creating an application, in which a camera is showing with an option on screen to hide and show grids on the screen. I created this grid by CustomView and it was working fine. but when I hide the ...
Dimensional Sys's user avatar
1 vote
1 answer
319 views

NPE on setting visibility

Some users of out application are complaining about a nullpointerexception, which seems to occur only to them (HTC Desire, newest Android, 2.3?) but is not reproducable on other devices. I'm a bit ...
nob's user avatar
  • 1,077
0 votes
2 answers
575 views

Android - check if a view is visible to the user

Say I have View A and View B as sibling views in my Android activity. View B hides View A (for example, view B has a black background hiding view A) They both have the exact same dimensions filling up ...
And's user avatar
  • 45
0 votes
0 answers
671 views

(VSCode): Hide views when file type exists in workspace

I am developing a VSCode extension and would only like a viewContainer to be visible if the workspace has a file with a given extension. It seems if all views in a viewContainer are hidden, it will be ...
DS7's user avatar
  • 140
0 votes
0 answers
34 views

How to Change my Visibility on ViewGroup if any value in my ViewGroup Kotlin Language?

I want to change Groupview.visibility = View.VISIBLE to be GroupView.visibility = View.GONE. How should the code be? this is my Activity.kt if (viewModel.inputPosTableArea1.value != "") { ...
Ivon Khalif's user avatar
0 votes
1 answer
16 views

Java JTextField view from the Right

I have a JTextField that I'm trying to get to automatically view from the Right (Not align to the right), so if the text is to long for the JTextField it will display the last characters in the String ...
Sharmastic's user avatar

15 30 50 per page