Questions tagged as 'android'

1
answer

Firebase Query realtime database does not return changed values in the database

I have a query in Firebase that should return user data to verify that it still has access and its level of access to the system, however when modifying the values the query continues to bring the previous values. private void buscarUser(Strin...
asked by 15.06.2018 / 16:47
1
answer

Difference between android.content and android.support.v4.content

When I use Fragments or AsyncTaskLoader, two options appear for the same element: android.content and android.support.v4.content What's the difference between the two? These are the settings for my project: minSdkVers...
asked by 10.02.2018 / 19:14
2
answers

Capture the moment the cell phone screen was turned on and when it was deleted

Hello!    I am building a project similar to an alarm clock but I am having some difficulties trying to use the broadcastreceiver class. Problem:     I want to capture the date and the exact time that the cell phone screen was lit, that is, if t...
asked by 31.03.2018 / 15:49
1
answer

Changing the back button

I'm looking forward to changing this back button. HereintheforumIfoundthiscode<itemname="android:homeAsUpIndicator">@drawable/back</item> <!-- Icone de voltar --> But it looks like this: The icon took the entire to...
asked by 14.02.2018 / 14:58
1
answer

SharedPreferences methods not found

I can not save using SharedPreferences , Android Studio accuses methods do not exist. By the official SharedPreferences documentation has the 2 forms, as needed from where find the value: Calling any context ( getSharedPrefere...
asked by 15.02.2018 / 19:50
2
answers

Call method with parameter of View type, in another method

Examples of a method that requires a View public void lista(View v) { Toast.makeText(this, "Ok", Toast.LENGTH_SHORT).show(); } public void botaoAbrir (View view) { Intent i = new Intent(this, NovoRegistro.class); st...
asked by 01.02.2018 / 13:40
1
answer

Open pdf by URL and PDFView InputStream

I would like the user to enter the product code (in activity_main.xml ) and click the button. The screen changes ( view_pdf.xml ), it would download the PDF ( AnsyTask ) and it would open in PDFView by pdfView.from...
asked by 06.03.2018 / 17:49
1
answer

Treatment of decimal places EditText

I need to set a number of decimal places for EditText on Android. For this I used InputFilter as I show below: public NumeroFormatado(int digitsBeforeZero,int digitsAfterZero) { mPattern=Pattern.compile("[0-9]{0," + (digitsB...
asked by 27.02.2018 / 12:37
2
answers

Background EditText Alpha (transparency)

I'd like to know how to make the EditText background transparent, like this: Itriedthefollowingways,butwithoutsuccess:edt.xml<?xmlversion="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"...
asked by 07.02.2018 / 12:10
1
answer

Customizing EditText on Android

I have seen that there are several ways to customize a EditText , one is in background and the other is XML . What would be the best option? Is it disadvantageous to use background or does it work?     
asked by 13.03.2018 / 04:20