Posts by Rodrigo Paixão • 562 points
27 posts
-
0
votes3
answers113
viewsA: problems in passing data to new Activity
I found some divergences in the print of your debug and the error message and the sent code. First, make sure you’ve fixed the cast for the TextView, declared as nomeView. According to Leonardo…
-
2
votes2
answers79
viewsA: Action after back background application
According to the life cycle iOS, similar to the onResume Android, would be the viewDidAppear(): override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) //sua lógica } In the…
-
0
votes1
answer955
viewsA: Webview Android Studio giving error to open mailto email links:
It turns out that the webview is making an internal request to open the email. Include the code below: protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);…
-
0
votes2
answers43
viewsA: App Closes when installing when I will test
The error occurs when, even before the Activity be created, you are assigning a value that does not yet exist of the layout Ids. Learn more about the Lifecycle android. Change your code to: private…
-
3
votes2
answers102
viewsA: Problems using camera, generate, edit and save image
Let’s get to the point, which is causing the error. Is missing the statement of File Provider. Insert into the Manifest.xml: <application> . . . <provider…
-
1
votes2
answers120
viewsA: Android Studio 3.2.1 does not locate "Default Activity"
Try to reset the Android Studio Cache on: File -> Invalidate Caches / Restart... If it doesn’t work, make sure that all SDK, JRE, and NDK paths are updated and pointing to the correct…
-
0
votes1
answer109
viewsA: Android Development with Android Studio - Recyclerview is not working
Hello, Matthew! Confirm that your Android Studio is up to date. On Help > Check for Updates... Modify the implementation of the components to: implementation…
-
0
votes2
answers449
viewsA: Error opening another Activity
Hello! Check that the Activity (Mainactivitylogin) you created is in Manifest.xml, within the application tag: <application> android:allowBackup="true" android:icon="@mipmap/ic_launcher"…
-
0
votes1
answer69
viewsA: Data from a Selected Recyclerview
Hello, you are creating an Animeactivity object, to receive the object that was "Serialized". Since you sent the Anime object. Changes line 28 of class Start visit: Anime anime = (Anime)…
-
1
votes1
answer62
viewsQ: How to access another application with Sqlcipher database by passing the password in Content Provider?
In the code below, I grant access to the database in app1, using Content Provider, which makes use of Sqlcipher: App1 public class StudentsProvider extends ContentProvider { private SQLiteDatabase…
-
0
votes1
answer864
viewsA: Error validating android Studio field
The Warning of the Method validaCampos() is within the last field condition, in case the field confpass. That is, it will only display if the condition confpass is true. Adjust as follows: private…
-
0
votes1
answer32
viewsA: How to put a system contact in Edittext?
Try to implement the Activity result (since you are using startActivityForResult): @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode ==…
-
2
votes2
answers52
viewsA: Save typed email and use it in a textview?
I imagine you want to open another Activity and display in a Textview, the email typed on the login screen. If it is only for display and use as proof of concept, you can do as follows:…
androidanswered Rodrigo Paixão 562 -
2
votes2
answers50
viewsA: Layout with listview questions
Add to ListView the weight android:layout_weight="1" this way the layout will reorganize.
-
3
votes1
answer941
viewsA: Android - Imagebutton image is not displayed
Modify the 3 app:srcCompat for android:src
-
1
votes2
answers2323
viewsA: Error "is not an enclosing class"
I believe this message is occurring when performing the Toast.makeText(MainActivity.this in class TesteHandler. Try passing the context on Handler handler = new…
-
3
votes2
answers336
viewsA: How to eliminate the space left by invisible views on the screen?
Within the class of Activity, use the object containing this button and when enter the condition to become invisible implement: button.setVisibility(View.GONE); If you have any conditions to return…
-
3
votes2
answers252
viewsA: How to control the lighting (brightness) of Android via code for all activities?
You can create an "Activitybase": public abstract class ActivityBase extends Activity { @Override protected void onResume() { super.onResume(); } @Override protected void onCreate(Bundle…
androidanswered Rodrigo Paixão 562 -
3
votes2
answers499
viewsA: Error android.database.sqlite.Sqliteexception: no such table: fs_promocoes
To keep you from always falling onUpgrade, make a test, inserting a condition that occurs only if you make the Database version change (VERSAO_BANCO): @Override public void onUpgrade(SQLiteDatabase…
-
1
votes0
answers1228
viewsQ: Real-Time Facial Recognition on Android
Good morning! I’m creating a real-time facial recognition app. The app should compare the video image to a recorded image. In virtually all the researches I did the most suitable to be used was the…
-
0
votes3
answers969
viewsA: Creating an Activity and calling multiple Layouts can be harmful?
I don’t see how harmful. You may have problems if you need to implement onStop() or onPause() in this same class of Activity. However, for this feature, you have already considered using Fragments?…
-
2
votes2
answers6930
viewsA: Why doesn’t my image appear when running the app?
I’ve had some problems with images on android, many of them disappeared with the use of a library called Picasso. This situation occurs because the image is not "fitting" within the layout size, in…
-
2
votes1
answer348
viewsA: Receive parameters of different Actions and add
Only with this code is it hard to understand what really "is not working". What value is being displayed to you on textView lblSaldoAtual? Is passing to the Intent call this Activity the values…
-
0
votes4
answers14893
viewsA: Advantage and advantage between onClick and setOnClickListener
There is no more correct way. But the second option setOnClickListener in activity is recommended as good practice. For having a faster view of the function that the method has. To perform a…
-
0
votes2
answers938
viewsA: How do I keep the Imageview ratio in Android Studio?
I’ve had some problems with images, many of them disappeared with the use of a library called Picasso. To use, simply insert into the dependencies of build.gradle: dependencies { . . . compile…
-
0
votes2
answers1151
viewsA: Hide the Webview address bar
Try to insert into Androidmanifest.xml, within the Activity where he owns the webview: <activity . . . android:theme="android:style/Theme.Light.NoTitleBar.Fullscreen" ou…
-
2
votes2
answers154
viewsA: How to turn a system out to string?
See if this helps. String mensagem = "Mensagem"; TextView texto = (TextView)findViewById(R.id.id_do_texto_no_layout); texto.setText(mensagem); To "print" on the android screen, we use a textview in…