Posts by André alas • 340 points
26 posts
-
1
votes2
answers498
viewsA: Android Activity does not open
You are calling the method loadCotaçãoAlterar() and then calling the findViewById() of listView and progressBar.... There is your mistake! ** Solution ** Call first the findViewByIds() and then call…
-
0
votes1
answer66
viewsA: Mask of entry of measures in metro
Good morning, my friend.... there are two ways to do this: 1 Through code or in the second way that is much simpler and I’ll show you below: ** 1st Implementation ** Add the following line to your…
-
1
votes1
answer373
viewsA: How to close app when I press the native back button of android?
Call the back pressed method and finish the activity with finish(). If you’re in a fragment, call getActivity().finish() It is very important to keep in mind that when starting a new activity in…
androidanswered André alas 340 -
1
votes2
answers1351
viewsA: Instant Run works but file . apk does not install
The Smartphone you want to install the .APK is the same as Instant Run ? "If yes" then it’s probably the PLAY PROTECT that does not allow you to install applications from unknown source. To resolve…
-
1
votes1
answer27
viewsQ: How to change to property android:fontFamily="casual" in a textView dynamically?
I would like to know how to change the font to casual in my textView through java code. TextView text1 = findViewById(R.id.myTextView); I want to change the font from text1 to casual…
-
0
votes1
answer57
viewsA: Android - Arraylist is not being filled
Take a look. I think the problem is that you were not making the list Adapter for recyclerView. public class CadastroFragment extends Fragment { View view; EditText newNome; EditText newRamal;…
-
0
votes1
answer32
viewsA: How to place a progressbar over the elements
Following @Valdeir Psr’s comment the last parent element overlaps the others. Therefore, simply reposition your circular progress inside the Relativelayout contained in Scrowview to the last…
androidanswered André alas 340 -
0
votes2
answers1198
viewsA: Summon Fragment within Fragment
The answer above is correct, but the code below also works: FragmentManager fragmentManager = getActivity().getSupportFragmentManager(); FragmentTransaction fragmentTransacion =…
-
1
votes1
answer32
viewsA: Dynamically change the pattern color of a text in a standard listViewAdapter?
For those interested the solution is simpler than it seems. See how easy it is in my code below: static final String[] hours = new String[]{ "0:00 da madrugada","0:30 da madrugada","1:00 da…
-
0
votes1
answer608
viewsA: Capture selected Recyclerview item to another screen
Dealing with data contained in Recyclerview is a bit complex as it does not contain the Onitemclicklistiner() method as in a Listview. To do this, you will have to create an interface in the…
-
0
votes3
answers455
viewsA: Show or hide an image in Android Studio
I think I understand your question. They are two images of a lamp side by side. When one is lit the other has to be off. If that’s right then see the code below. //Declare as variáveis; private…
-
2
votes2
answers66
viewsA: Why does my "Textappearence" and my "Textcolor" not work on some Android devices?
The problem may be in the device operating system. This is because, the device MOTO G2 has a user registration functionality for system interaction, as well as on Pcs with Windows installed that…
-
2
votes1
answer32
viewsQ: Repeated id’s in different xml layouts on Android
I am developing app and noticed that I can put the same id in two different xmls. For example: Imagine a Textview. In the 1st Layout I define your id: <TextView android:id="@+id/textViewExemplo"…
-
1
votes2
answers66
viewsQ: Why does my "Textappearence" and my "Textcolor" not work on some Android devices?
I am developing an app and obviously it contains many textViews. I noticed that when installing my app on some devices, more specifically on MOTO G2, I noticed that my textViews get weird and does…
-
-1
votes2
answers50
viewsA: How to publish image files using Firebase Storage in offline mode?
Save your images using local database and use the Workmanager library that works in the background to sync to firebase when internet is available.
-
2
votes1
answer102
viewsQ: Message from "Empty Child" on an Expandable Listview on Android
I want to create a statement to the user stating that a Group of an Expansible Listview does not contain any Child (That the group is empty) as in the image below. Searching the net, I noticed some…
-
0
votes1
answer65
viewsA: Back to the main Fragment from a button
Place toolbar.setTitle("Expresso1002"); onCreateView of the splinter leading() and every time this fragment is started, it will automatically change the title of your Toolbar.…
-
0
votes2
answers34
viewsA: Logic Problem JAVA Clock Program
Try this: if(hours.getValue()==0 && (periodo.equals("am") || periodo.equals("AM")){ hours.setValue(hours.getValue()+1); periodo = "am"; }else if(hours.getValue()==12 &&…
javaanswered André alas 340 -
3
votes2
answers613
viewsQ: Convert an Arraylist<String> into a String[]
I need to pass on the values that are in my ArrayList<String> for a String[] because I need to make a setInputData("INPUT",input). I mean, I want to convert the next ArrayList<String>…
-
1
votes2
answers2044
viewsA: How can one Fragment call another Fragment?
It’s very simple! Inside the "onClick" method of the button used to call another fragment do the following: FragmentManager fragmentManager = getActivity().getSupportFragmentManager();…
androidanswered André alas 340 -
2
votes1
answer34
viewsA: Android Studio and SDK
Generally, Android Studio already comes with the built-in SDK. But you can install the SDK via the SDK Manager tab, located at the top of Android Studio.
-
6
votes1
answer51
viewsQ: Detect implicit Intent action when the Android Operating System changes the time manually
I need to detect in my application when user changes system time manually. How do I do this? For example: If user restarts the device I can detect this event with on my Broadcast receiver so: if…
-
0
votes1
answer335
viewsA: Error running run-android on a React project
Look here is not really an answer and after a while I’ll take it, it’s just to try to help you somehow.... You see, when it happens to me errors of this type with compilers and executors and in…
-
1
votes1
answer101
viewsA: Android studio: how to organize images in subfolder
Android studio only recognizes the following sub-folders of drawable: Image size sub-folders: drawable-hdpi drawable-mdpi drawable-xhdpi drawable-xxhdpi In this case, android checks which is the…
-
-4
votes2
answers105
viewsA: More appropriate way to name a list
You can name it in the way that best suits your project. The only rule you should keep in mind is to always follow the camelcase pattern. Always starting with lowercase letter in the first word and…
-
0
votes1
answer32
viewsQ: Dynamically change the pattern color of a text in a standard listViewAdapter?
I have the following code: String[] hours = new String[]{ "0:00 da madrugada", "0:30 da madrugada", "1:00 da madrugada", "1:30 da madrugada", "2:00 da madrugada", "2:30 da madrugada", "3:00 da…