Posts by Diniz • 136 points
14 posts
-
0
votes2
answers72
views -
0
votes1
answer38
viewsA: Open Alertdialog in current Activity for an already finished android
Create an Activity base to put the Receive code on it, then you will inherit it from it in all your Activity. Basectivity public class BaseActivity extends Activity { protected void onCreate(Bundle…
-
0
votes1
answer105
viewsA: Break line when components inside Recyclerview occupy full screen width
I think you are using Linearlayoutmanager, just switch to Gridlayoutmanager.
-
1
votes1
answer34
viewsA: Decision coming straight to Else
You must make the condition using the text typed in Edittext like this: if(txtusuario.getText().equals(USUARIO) || (txtsenha.getText().equals(SENHA)))
-
0
votes2
answers248
viewsA: How to return values of a daughter Activity in Kotlin
Hello, you should use Onactivityresult to retrieve the data: You start the Bar like this: Intent(this,Bar::class.java); startActivityForResult(intent , REQUEST_CODE); In the Bar class when the Butão…
-
0
votes1
answer109
viewsA: Instrumental Tests Android Studio
You need to import because your tests must be in: module-name/src/androidTest/java while the Mainactivity class is in: module-name/src/java.
-
1
votes2
answers759
viewsA: How to give Restart in an Activity?
Completing the Zulian response, you can put this code in the creation of Activity: new CountDownTimer(RESTART_TIME, 1000) { public void onTick(long millisUntilFinished) {} public void onFinish() {…
-
1
votes1
answer244
viewsA: Call open Activity via Notification without losing the information
You are probably creating another Activity, test put to the Activity in your manifest: android:launchMode="singleTask" Another problem may be that you are wiping the data on OnStart() or OnResume().…
-
0
votes1
answer108
viewsA: By pressing Play button more than once the sound plays simultaneously
Good morning, this is happening because you are creating more than one instance of Mediaplayer. In this case the ideal is for you to create a Service to maintain only one Mediaplayer facility that…
-
0
votes2
answers488
viewsA: Video view resizing to video size
Good morning, I think it is possible to do this with Videoview but another option is to use Surfaceview: xml: < SurfaceView android:id="@+id/surface_view1" android:layout_width="match_parent"…
-
1
votes1
answer69
viewsA: How to run videos on android
Good evening, Android offers a wide API for running medias, the easiest way for you to run videos is by using Videoview which is a wrapper of Mediaplayer and Surfaceview. Simple example, add the…
-
0
votes2
answers176
viewsA: How, by clicking on the notification, delete the notification and do not open the application?
Create the notification: private void sendNotification() { NotificationCompat.Builder builder = new NotificationCompat.Builder(this); builder.setSmallIcon(R.drawable.ic_stat_name);…
-
1
votes2
answers429
viewsA: Return which Alert Dialog button was clicked
There is no way to do this in this method, it will be running in the dialog creation and not when the buttons are clicked. You must use the methods that listen to the click event, onClick, to…
-
1
votes1
answer732
viewsA: Positivebutton and other alertDialog buttons on android are disabled, how to solve?
I tested the commented code, that’s correct, but the unclaimed code was breaking, so it also worked well: AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());…