All Questions
Tagged with visibility android
622
questions
0
votes
0
answers
8
views
the softkeyboard makes view disappear when it pops up
I have this situation
when i get the focus on the inputText, therefore triggering the softkeyboard to show up, the second text and the second button disappear.
I tried to examine with the debbugger, ...
0
votes
2
answers
2k
views
Flutter, how do I display Bluetooth device names in a Flutter app?
I'm currently working on a Flutter application that requires connecting to Bluetooth devices. I'm using the flutter_blue package to handle the connection.
My issue is that I'm unable to display the ...
8
votes
1
answer
179
views
Calendar View show/gone inside Recyclerview ViewHolder Issue on Android 8, 9 only
I have a recyclerview with 2 or more viewholders,
1st Viewholder is just top heading banner
2nd vlewholder is for booking widget which has 3 dropdowns/detail menus including CalendarView -- All in ...
0
votes
0
answers
41
views
Android - Why this TextView is moving its position after changing its visibility programmatically?
Initially both TextViews are visible and aligned correctly:
After clicking the Button, I set both TextViews visibility to GONE. Second time I click on the Button, I set the visibility again to ...
0
votes
2
answers
124
views
Dynamically added Views not visible
I am trying to add TextViews to a LinearLayout wrapped in a ScrollView during runtime, but the visibility of the TextViews will eventually not display on screen even though their visibility flags are ...
0
votes
1
answer
384
views
Icon does not become invisible in jetpack compose
I have simple viewpager and toolbar in my code :
@Composable
fun DefaultAppBar(
mainViewModel: MainViewModel
) {
CompositionLocalProvider(LocalLayoutDirection provides ...
0
votes
1
answer
240
views
'void android.widget.LinearLayout.setVisibility(int)' on a null object reference when i want to display a LinearLayout
I have a problem with a button that modifies the visibility of a LinearLayout
I always get the error
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.LinearLayout....
0
votes
2
answers
59
views
How to change location of Textview
I have a Linear Layout inside of Constraint Layout. The cardview visibility changes depending on the data. How to align start textview1 and textview2 if cardview visibility is invisible ?
1
vote
1
answer
338
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 ...
0
votes
1
answer
542
views
Android app widget's visibility is not updated
I reduced a bigger portion of code to this easy to test AppWidgetProvider class and I still have this problem.
Basically, I have a simple navigation part with a prev and next button. If the index is 0 ...
3
votes
2
answers
1k
views
QUERY_ALL_PACKAGES warning from the play store even if that permission do not appears in the AndroidManifest.xml merged file
I am coding this android app and I was using the CometChat library to add chat functionality to my app.
When I did that with newest or oldest version I had that permission that was automatically added ...
2
votes
4
answers
2k
views
Android: View Visibility set to View.VISIBLE but View is not Visible
In my app (general construction described below), I have a timer, which the user can start by clicking an in-app button.
When the timer starts, a notification is shown. In the notification, there's a ...
1
vote
1
answer
133
views
Android "visibility" doesn't change if next instruction take long time
I have following situation in my fragment.
@SuppressLint("ClickableViewAccessibility")
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState:...
1
vote
1
answer
169
views
Android: Changing Views visibility on Activity start | Hide Notification panel on Notification Button click
My app has a Notification that holds a Button.
When the user clicks the Button, the app should open (if it was closed) and show a custom dialog, which I've created by a bunch of views.
Showing the ...
0
votes
1
answer
262
views
Android 11 Restrict specific app from Getting My App's Package Name
I have Noticed some other apps who are getting my app's package name. So I want to prevent them from getting my app's package name and name.
-1
votes
1
answer
33
views
How to invisible a Linier layout from other activity without using Intent?
I have given here details about my project and I want that when I will click on the Button it will go to the second activity and also it disappears from the second activity layout.
Button btnClick;
@...
0
votes
2
answers
578
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 ...
0
votes
1
answer
27
views
Create Intent, but leave BottomAppBar visible
I have a standard Android app with a BottomAppBar, 3 fragments/tabs, a floating action button which opens an Intent. The intent occupies the whole screen and covers the BottomAppBar. Is there a way to ...
2
votes
1
answer
1k
views
How to change the way MotionLayout animates view visibility
Default MotionLayout view visibility animation is proportional scaling of view's size.
Not even scaling of resulting image, but actual View size changes.
On TextView this causes text realigning, so it ...
1
vote
0
answers
59
views
Android: "Can't resolve method 'setVisibility' in group"
This piece of code fails to compile because the method setVisibility() cannot be resolved.
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
super.onViewCreated(view, ...
1
vote
3
answers
81
views
Recryler in imageview how to make invisible
How do I fix this issue?
ı want to recylerview in Imageview make INVISIBLE but it doesn't work
my codes are below
and sory for my bad english :)
this movement in many places but I could not find the ...
0
votes
2
answers
107
views
How can i eliminate Empty spaces in recyclerView when trying to hide cards with null properties?
Empty spaces in recyclerView when trying to hide cards with null properties
Hi, i'm new here. So this is my first question. I am trying to use the google Books API for a task and when I implement ...
0
votes
2
answers
922
views
How to change visibility of textview on button click without providing ID to them?
In this I need to know that how do I access a view without providing the Id to them in this there will be no id provided in any of the file. Without the use of external libraries like viewbinding, ...
-2
votes
1
answer
103
views
Android java.lang.NullPointerException on not empty object [duplicate]
I'm trying to hide an image view:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_search);
allImageView = ...
0
votes
2
answers
491
views
How to set visibility GONE of a Linear Layout which is inside a scroll view and contains two TextViews inside?
The main layout is a Linear layout inside that a scroll view is there which contain sublayouts. Here is my layout [omitted everything except the specific layout (marked with red) as it will be very ...
0
votes
1
answer
53
views
Make display data textviews invisible until a city is searched
I set my textviews on my weather app to display the data for cities when searched on my search panel (i.e temp_out.setText(response.body().getMain().getTemp() + " ℃"););. It works quite fine ...
0
votes
2
answers
101
views
Creating subText with visible/invisible method across TextViews
I have created two textViews that the first one is the main title and the second one is the subtext of the title. So I want to make the subtexts visibility to depend on clicking the main title.
It ...
0
votes
2
answers
172
views
Menu item visibility doesnt change partly
I am doing an app with login fragment and when I log in or out it should update menu items (for guest only login item, for logged users : home,favorites, logout)
When I login in ,
nothing changes only ...
0
votes
1
answer
127
views
Unable to change visibility based on sharedpreference inside recyclerAdapter (Viewpager2)
I got a Viewpager2 adapter , with 2 EditText and 2 TextView in it.
At the beginning, the EditTexts are visible, and the Textviews are gone. If I click on a button, if what is written inside 1 (or both)...
0
votes
2
answers
2k
views
Invisible items becomes visible on scroll in RecyclerView
I have two buttons to play and pause a track in a RecyclerView item. When play button tapped, I want to hide it and show pause button. I've done this and it's working but I have a problem. Once I ...
0
votes
3
answers
292
views
Unable to change visibility of view other than onCreate method
I am unable to change the view visibility inside other function rather than onCreate method. Its working only at time of onCreate is called.
public class CameraXActivity extends AppCompatActivity {
...
2
votes
1
answer
241
views
Doing a task after a view became invisible
I'm writing a screenshot app using Android MediaProjection Api in which an overlay button is shown on top of everything and user can click it to capture a screenshot anywhere. Since MediaProjection ...
-1
votes
1
answer
2k
views
visibility of a layout in Kotlin
I got a layout that i want to make visible (which was "GONE" first) on clicking a button.
<include
android:id="@+id/registration_layout"
layout="@layout/...
7
votes
1
answer
2k
views
doOnPreDraw method not getting called for some items in a recyclerView
I'm having troubles with some animation in a recycler view. I do the relevant measurements in onViewAttachedToWindow:
override fun onViewAttachedToWindow(holder: PairingViewHolder) {
super....
0
votes
2
answers
242
views
View layout that are initially hidden, then onclick will make view visible, and vice versa(Android)
I have a constraint layout visibility that are initially set to GONE expandableLayout.setVisibility(View.GONE);. I want to make the view to be visible when 'setOnClickListener' are issued. Then, when ...
1
vote
2
answers
181
views
Cant check if my textview that inside of an array is visible or not in Kotlin
I have a 2D array (matrix) of Textviews called Board. Board has 16 Textviews in it, only one of them is invisible. In this given lines of code, I tried to find the invisible one between all the rest. ...
0
votes
1
answer
229
views
Live Wallpaper isVisible/onVisibilityChanged not working with Android 9+ App drawer
I have observed No visibility change reported by the isVisible() and/or onVisibilityChanged() when a Live Wallpaper is covered by AppsDrawer on an Android 9 phone. I am guessing it's because the Apps ...
1
vote
0
answers
690
views
Motionlayout and visibility make layout different to the Constraintlayout
I am converting the current constraintlayout to MotionLayout for the animation. What I do is quite simple, when the user scroll the second recycler view , the first recycler view should be hide. And ...
0
votes
1
answer
84
views
android Xml layout, visibility gone resize my parent layout
i have an issue with my xml layout
i have a switch which is supposed to hide / activate the visibility of one my layout
but when i hide my layout, somehow my root layout width is modified
here is my ...
1
vote
1
answer
458
views
Set visibility for view to gone for an inflated layout
I am trying to set the visibility of some views as gone after layout inflation but it doesn't work. If I try to access the tag of the view , I can clearly see that I am accessing the right view. This ...
4
votes
1
answer
921
views
Android MVVM UI control
I'm started to learn MVVM with LiveData on Android. I think displaying and updating basic data is clear to me. The topic I struggle to find a best practice for is controling the UI.
Let's say I have a ...
-1
votes
1
answer
647
views
how to change visibility a view in a fragment from the activity
As stated in the title how can change visibility a view in a fragment from the activity?
My code has a launch activity and a fragment. I want to change the visibility of a view inside fragment from ...
0
votes
2
answers
63
views
Visibility to Gone in Android
I am working on dynamic view. I am everything like generating Image view's id ,constraints with loop and setting all in code. I want one Pause and Start button. If I click on pause everything should ...
2
votes
1
answer
1k
views
Java Android Badge Drawable not working properly after configuration change
I have a Bottom Navigation view with a badge drawable that shows new chats.
This badges are updated upon a listener to Firebase database, where I store the notification counter. When this value ...
0
votes
3
answers
3k
views
How to set the visibility of a view after recyclerview becomes empty
I'm trying to dynamically set the visibility of a view which is in the same fragment as the recyclerview to invisible when the recyclerview becomes empty.The problem is that i'm making the deletion of ...
0
votes
1
answer
670
views
Changing textview visibility in android studio
I want to click to hide or unhide a textview using android studio. If it is visible, one click will make it invisible. If it is invisible, one click will make it visible.
Currently, only half of the ...
0
votes
1
answer
807
views
Changing visibility of button in viewholder of recyclerview (cardview is used)
This question is already answered but not for cardview I guess, I have already gone through most answers and experimented with them still my problem is not solved.
I have a recyclerview with adapter ...
0
votes
1
answer
714
views
How to get overflow visible working on an image with flex on Android with React Native V0.61 and Expo
I'm using React Native 0.61 with Expo SDK 37 which should support overflow visible as stated in the docs (https://reactnative.dev/docs/image-style-props#overflow). Nevertheless I can't get this to ...
0
votes
1
answer
601
views
The App menu bar has disappeared after upgrading to Android Studio 3.6.3
After upgrading to Android Studio 3.6.1 the Menu Bar and all the Images in my app disappeared. I did not make any changes to these items. All the Images have become gray boxes.
This is the menu xml:
...
1
vote
1
answer
132
views
How to handle ConstraintLayout horizontal & vertical with view.GONE
already use vertical and horizontal chain in constraint for handle visibility gone. But they are not enought for the thing i want to do.
I need to set a view like this example:
1 2
3 4
5 6
And, for ...