Posts by Lennoard Silva • 581 points
34 posts
-
0
votes1
answer33
viewsA: setOnClickListener loses the default animation
Try to use the AdapterView.OnItemClickListener in listview to handle clicks. Discard onClickListener of the item in getView of your Adapter for now. @Override public View getView(int position,…
-
1
votes1
answer80
viewsA: Fragment closes by clicking on Textview Kotlin
I think the problem is in the variable (possibly global) window. You are assigning her the root layout and then using the findViewById() with her. What’s more, she’s doing all this yet onCreateView,…
-
0
votes1
answer119
viewsA: Display the contents of a button and make it disappear after a period
btn1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { btn1.setText("1"); // O Texto do botão voltará a ser "?" em 5 segundos new Handler().postDelayed(new…
-
0
votes1
answer94
viewsA: Start with Splash Screen
When using the theme Apptheme.Noactionbar already face your Activity will not have a toolbar (where the title is). So getSupportActionBar() return null, unless, of course, you have called…
-
0
votes1
answer118
viewsA: Data from Firebase takes a long time to complete loading and hinders sorting objects
Big problem this huh, since Firebase is async (too), I could only think about putting the firebase query inside a while, and wait for everything to end there, and this all within a thread, not to…
-
1
votes4
answers496
viewsA: Hide element from Activity
"I need the buttons to be hidden only when there is the touch on the screen and they return when the user touches again." Use the onUserInteraction of your Society, follow an example: public class…
androidanswered Lennoard Silva 581 -
1
votes1
answer41
viewsA: How to make only one user have access to Activity?
Some things you can try: Java constants. public final class Constantes { // TODO: Revisar o ID public static final String UID_ADMIN = "dGVzdGVAdGVzdGUuY29t"; private Constantes() { // Sem instâncias…
-
0
votes1
answer180
viewsA: Take parameters from a Recyclerview
Let me try to synthesize what Alessandro Barreto told you. Make your Anime class implement Serializable public class Anime implements Serializable { private String name; private double rating; //…
-
0
votes2
answers302
viewsA: How to create new Textviews inside a Java scrollview in android studio?
And I need to know how to change Textview attributes and how to put in Scrollview Let’s say you have a Scrollview in your layout, all of which ScrollView is a ViewGroup, you would use the method…
-
1
votes1
answer58
viewsA: How do you run the getCidade() method with asynctask, and return the value of the city string to use in another method?
I hope this solves your problem without creating others. public class CadAnuncio extends AppCompatActivity { private static Double latiatual, longatual; private static String cidade; // ...…
-
0
votes2
answers537
viewsA: Permission denied on Firebase
Of a comment: I need only the user to read and write their requests. First, we can try to organize this way, see if this matches your needs: - users - uid - pedidos - idPeDIDoLE7NyOSXaLSZ - name:…
-
0
votes1
answer133
viewsA: Help with recovering Firebase nodes
If I understand your structure correctly, let’s take an example: - usuarios - idDouSUAriOAWcjvS_jG - id: "idDouSUAriOAWcjvS_jG" - nome: "Francisco João" - idade: 18 The user class may look like…
-
0
votes1
answer80
viewsA: Normal and long click only work after a first click on Imageview
Coming of that question, It seems clear to me what’s going on. Let me try to reproduce the flow of your application: You have set a android:onClick="clickimagem" in your Imageview, which when…
-
1
votes1
answer51
viewsA: Error: android.widget.Linearlayout cannot be cast to android.widget.Gridlayout
Layoutinflater.inflate(int Resource, Viewgroup root) Inflates a new hierarchy of views of the specified Resource xml. Launches Inflateexception if there is an error. Resource parameter: ID of an XML…
-
1
votes2
answers192
viewsA: Android Activitycompat
Activitycompat(). requestPermissions(...); Use static class method ActivityCompat, you have placed parentheses, so the compiler is expecting a local method that does not exist.…
-
1
votes1
answer83
viewsA: mkdir on android does not work
There is a more natural method to reach the directory where you are trying to create your folders: Context.getExternalFilesDir(@Nullable String type) Returns the absolute path to the directory on…
androidanswered Lennoard Silva 581 -
3
votes1
answer153
viewsA: Creating a positiveButton in a Dialog on Android
And I wanted to add a "ok" button that would close the dialog when it was clicked. [...] Any hints on how to add this button? 1. Creating a Button in the dialog layout You can add a Button at the…
-
0
votes1
answer131
viewsA: Difficulty in using Datepicker
I thought of the following proposal: Use a DatePickerDialog in a custom class that will have an interface that will return a Celendar every time the user completes the date selection:…
-
1
votes1
answer84
viewsA: open links mo webview without having http://or https://
An extension of Woton Sampaio logic botaoNav.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Remover possíveis espaços em branco no início e no fim da…
-
1
votes1
answer262
viewsA: How do I send multiple values to a single Activity
How do I send this data via key,? Just like a Bundle ago? private void iniciarActivityBundle(Bundle bundle, Class<?> cls) { // Supondo que este método está em uma activity, this é o contexto…
-
1
votes1
answer501
viewsA: Ondestroy android studio
"Whenever gave an error in android code should not call onDestroy?" No, there are no guarantees that the system will always call onDestroy, when you need to release resources or when someone gives…
androidanswered Lennoard Silva 581 -
0
votes1
answer110
viewsA: "android.view.Inflateexception: Binary XM file line" when changing activity
As described here, is a problem with the Fbutton library you are using. Follow the link to get alternatives.…
-
1
votes1
answer63
viewsA: Android - Share Preferences for another device
"Yes, "it’s possible, not as directly as you might be thinking. 1. Saving preferences in something concrete Using the Objectoutputstream we can create a file with primitive data to be later read and…
-
0
votes1
answer144
viewsA: How to edit the position of Floating buttom
Change the root layout to one CoordinatorLayout or LinearLayout or FrameLayout and put on both Constraintlayout and Floatingactionbutton as children. Leave Fab with…
androidanswered Lennoard Silva 581 -
0
votes1
answer63
viewsA: I’m having trouble opening an Activity Fragment
Caused by: android.content.Activitynotfoundexception: Unable to find Explicit Activity class {com.example.client.postit/com.example.client.postit.postActivity}; have you declared this Activity in…
androidanswered Lennoard Silva 581 -
2
votes1
answer67
viewsA: Firebase database reset data when soon
User myUserInsertObj = new User(fireuser.getEmail()); You are using this line right after login with firebase, you are creating a new object, not recovering one from the server. fireuser =…
-
0
votes1
answer125
viewsA: Button does not appear in an Active and appears in another
If I understood correctly, the desired result would be the button appear on top (on top) videoview. Try to encompass both the Videoview and the button inside the FrameLayout Framelayout is designed…
-
0
votes1
answer259
viewsA: problem with vectors in android studio
I have no points to comment on If your app targets only SDK 21+, make sure to put your vectors inside the folder drawable or drawable-v21. I suspect that the vector xml is in a folder for another…
-
0
votes1
answer57
viewsA: Application Installation Failed
What version of Android Studio and the mobile model? Make sure that USB debugging is enabled and that there is no security module in your phone that is preventing installation, such as USB app…
-
1
votes1
answer69
viewsA: How to leave a hidden Seek bar until another button is clicked - Android
Welcome. I couldn’t exactly reproduce your doubt, so this answer assumes a normal Seekbar and a normal Button. "I thought about leaving the seekbar hidden or locked until the buttom is selected."…
androidanswered Lennoard Silva 581 -
1
votes1
answer255
viewsA: Changing the back button
Placing the item android:homeAsUpIndicator in the application’s default theme will make all activities that use this theme (possibly "Apptheme") use it. "You can determine a size by code in this…
androidanswered Lennoard Silva 581 -
1
votes1
answer40
viewsA: Save togglebuttom state
Use Sharedpreferences to save / get the status of ToggleButton (checked / unchecked) When starting Activity, check the saved value in the preferences, and programmatically change the status of the…
androidanswered Lennoard Silva 581 -
0
votes1
answer53
viewsA: Why does my recycleview not respect Match Parent?
Wrap your RecyclerView in a Layout (Framelayout, for example). This layout should also have android:layout_width="match_parent" Move the app:layout_behavior="@string/appbar_scrolling_view_behavior"…
-
1
votes2
answers286
viewsA: How do I publish apps for tablets in the Play Store?
Just one little addition: Creating Layouts for the smallest width as 600dp would be encouraged since you plan to publish for tablets. (layout-sw600dp) xxhdpi sometimes get uncomfortable on tablets…