request focus not working for material spinner android - java

I use a Material Spinner in a fragment and I want to request focus for it programmatically. The weird thing is, that it already worked several days ago. I checked my old version, where it is also not working any more. So maybe it is some Android update issue. The library was not changed in the meantime.
For requesting the focus i use these lines of code
inputHardness.setFocusable(true);
inputHardness.setFocusableInTouchMode( true );
inputHardness.requestFocus();
Please help me, I am quite stuck.

Related

How Do I Make Android WebView Load Page Modal Elements?

I'm trying to make a really simple app for a friend to display his bar's ordering website in an app for when they reopen with the social distancing measures in place. The web app already exists, so this is really a simple matter of displaying the content in a WebView.
I've got the page loading, the content is visible, the styling is done - The only problem is that it doesn't seem to be loading all the elements. There's a line of filters at the top which just display as 3 dots (i.e. loading), and when I click any of the items on the menu, nothing happens. There should be a window pops up asking for a table number etc... If I open this in the Chrome browser on my phone, rather than a webview in the app it works perfectly so I know it isn't the website.
I've done the following;
setJavaScriptEnabled(true);
setJavaScriptCanOpenWindowsAutomatically(true);
setSupportMultipleWindows(true);
I've also turned off safe browsing in the manifest in case that was blocking anything. I have also given the app permissions to use the internet. I can't figure this one out at all and nothing online seems to be helping!
Admittedly I'm a tester (automated, but still), so coding isn't my best suit. I may be missing something really simple here. Any ideas?
Scratch that. For anyone who's interested, I needed to add this line;
setDomStorageEnabled(true);
For such a simple thing it proved impossible to find info on, I just enabled everything until something worked! So hopefully you don't have to do the same if you're looking at this.

Android app button text disappears after months of working fine

I have a field service reporting android app that I created in Oracle MAF. it has been in use for almost a year now with no UI issues, Over the last few days, I have been getting reports from our end users that the button text is disappearing. so - anywhere where there is a button with text inside it, the text is not visible. same font is being used elsewhere in the app with no issues. All the end users are running this on the Samsung Tab A 8.1. The last android update for the device was a few weeks ago. The problem is slowly propagating, like only 4-5 users a day are reporting that they go to use the app and the text is gone. luckily they are used to the app and know what all the buttons do, but I have to eventually fix it. I can't get any straight answers from Our IT department or Samsung as to why it is happening like this, and the update didn't seem to have anything in it that could do this. A factory reset fixes it for a day or two, and then the issue comes back.
What it is supposed to look like
Example of missing text
Like I said, this has been working fine for a while now. I'm mainly looking to see if anyone is aware of an Android update that would cause this, or if there was anything in the Samsung security update that would do it.
Google pushed an update to Chrome that they have discovered caused problems like this, and many others.
I was able to instruct my end users to disable chrome and let it roll back to the factory version.
this fixed the issue.

Android Status Bar icons

I was using this amazing app 'Medium' for reading posts other day. I noticed an unusual visual effect happening at the status bar. Whenever I used to scroll down the post, the status bar icons were made invisible and some were made dim. I really liked this effect and tried to achieve it in my apps but was unable to do so.
Can someone explain how to do so programmatically?
It is the feature achievable by CollapsingToolbarLayout in android.
you may find several examples of this.
First, try to search wisely to understand the topics and google it as well.
Please check all this URL:-
https://antonioleiva.com/collapsing-toolbar-layout/
http://tutorialsbuzz.com/2015/11/android-collapsingtoolbarlayout-example_7.html
https://www.youtube.com/watch?v=BTYuLho5_rE

How to add a calender view to android app and populate it with events?

I am new to android and trying to make a android to learn different features and functions. I wanted to make a app which has a CalendarView and a list view which allows users to add their events and it'll show up on the calendar in the ListView. I do not where and or how to begin, I tried searching for tutorials on the youtube but could not find anything relevant, maybe I am searching for the wrong things. Could someone please guide me as to where I can look and whether they know tutorials I can look at, all I need for know is something pretty simple (well, I say simple.. but it seems very complicated!), a app which has a calendar and a ListView, when user adds events they show up on both.
I hope I am making sense of myself as I am pretty lost and that someone could point me to the right directions (hopefully a tutorial or something). The thought of it seemed easier but when I sat down to do it, I literally don't know where to begin.
Here is a Link to a stackoverflow question about costum calender views Custom Android calendarView
You can use some project from github for example this one https://github.com/SundeepK/CompactCalendarView by this project you can populate calendar with events

Android Dev UI - Text and image widget

Hi I am new to Android development and I want to add a specific looking view in the my main app window, which I have seen in many apps but dont actually know the name of it :) So its hard for me to check the android developers websites for details.
Below is a good example of an app using this widget or whatever is check the link:
https://lh3.googleusercontent.com/K7HJq6Be9AVf6EiDc0pviGLNyMJ4CL1f5Bw6HmxDUaQc7vpu18KAxrF6VlG5fJciFF59=h900-rw
Look at the ones that have Squat etc in thats Im referring to. Im not wanting to build a workout app, but I want to use a similar floating area like this, as I like the look. So the question is what is this called in android, its not a listview or textview I believe.
Sorry for the noob question but as I said Im very VERY green at Android dev.
Thanks
The view used here are
CardView - Check
Recyclerview -Check
Viewpager with fragments -Check
Toolbar- Check

Categories