cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
burliad
Helper III
Helper III

App button stays pressed

Hi All,

 

I have an app that has a regular button which is blue.  I noticed that after it is pressed for the first time on my android phone the button turns white and stays white as if it is permanently pressed.  Only way to gt it back to normal is to restart the app.

1 ACCEPTED SOLUTION

Accepted Solutions
eka24
Super User III
Super User III

So replace the formula with:

UpdateContext({MyButton:true});Navigate(BrowseScreen1,Fade);UpdateContext({MyButton:false})

 

Then in the DisplayMode of the Button:

If(MyButton,DisplayMode.Disabled,DisplayMode.Edit)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

9 REPLIES 9
eka24
Super User III
Super User III

Remove the Button and Insert a New button.

Also check the formula on the Pressed Property of the button.

 

Else

You can work around it by setting the variable:

UpdateContext({MyButton:true});YourOnSelectFormula;UpdateContext({MyButton:false})

 

Then in the DisplayMode of the Button:

If(MyButton,DisplayMode.Disabled,DisplayMode.Edit)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

New button didn't work,  pressed color = Button2.Fill

 

Going to try the workaround,  where does the UpdateContext({MyButton:true}); variable go?

 

Button OnSelect: 

UpdateContext({MyButton:false})

 

Button DisplayMode:  

If(MyButton,DisplayMode.Disabled,DisplayMode.Edit)
eka24
Super User III
Super User III

It should be OnSelect of the Button. what formula do you already have on the formula, can you give it out?

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Sure,  the OnSelect is

Navigate(BrowseScreen1,Fade)
eka24
Super User III
Super User III

So replace the formula with:

UpdateContext({MyButton:true});Navigate(BrowseScreen1,Fade);UpdateContext({MyButton:false})

 

Then in the DisplayMode of the Button:

If(MyButton,DisplayMode.Disabled,DisplayMode.Edit)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

That didn't work,  I added another button to the screen and it is doing the same thing.  I tried restarting the phone but that didn't work either.  Screen shot below,  the buttons are blue then turn white after you click on them.  they stay white until the app is re-started.

 

Screenshot_20200922-143446_Power Apps.jpg

eka24
Super User III
Super User III

Take a screen shot of the 2 formulas in your App:

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

They are not showing any errors, but the buttons still stay pressed in the app on the phone only.  It works on the computer.  I also checked my other apps on the phone and the buttons are working as they should, it is just this app.  I might try to rebuild the entire screen.  screenshots attached.

Just re-published and looks like its is working now....???

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (77,869)