Posts by jefferson • 98 points
12 posts
-
1
votes1
answer16
viewsA: How to hide decimals in pascal?
Just add :0:2 to the final result: WriteLn('$', valorA, ' é igual a R$ ', valorB:0:2);
-
0
votes2
answers107
viewsA: Python exercise
You can do it this way: #!/usr/bin/env python numbers = [] while True: try: n = int(input("Insira um numero negativo para terminar: ")) except ValueError: print("Entrada inválida!") continue…
-
0
votes1
answer66
viewsA: Listview in the Asynctask
I can’t run your code so I’m not sure, but I think your problem is related to your Listview id. listOSFechadas = (ListView)view.findViewById(listFechadasOS); I don’t understand why listechadasOs id,…
-
0
votes1
answer137
viewsA: Would you like to know how to change the color of selected items, Actionbar?
You can change the color of a View by pressing it (example: textView, button etc) by creating Selectors: drawable/selector.xml: <shape xmlns:android="http://schemas.android.com/apk/res/android"…
-
1
votes3
answers150
viewsA: Problems using string for resources
Try this way: public class Questions { private Context context; private Integer[] mQuestions = new Integer[]{R.string.Q1_function_insulin, R.string.Q2_any_name}; public Questions(Context context) {…
-
0
votes4
answers806
viewsA: Assignment of Java Arrays
I realize that you updated your question and did not accept any Answer, which leads me to believe that you want the "result" to be an Array string not an Array List String. Look at this modification…
-
0
votes4
answers806
viewsA: Assignment of Java Arrays
I modified your code and I believe I found the solution: String nomes[] = {"Pedro", "Diego", "Ana", "Carlos"}; String comparar[] = {"Juliana", "Pedro", "Ana", "Luiz"}; ArrayList<String> res=…
-
0
votes1
answer917
viewsQ: Grab an Image from the gallery and move to a folder
I’m using the following code to pick up the path of an image from the system: { Intent intent = new Intent(Intent.ACTION_PICK); intent.setType("image/*"); startActivityForResult(intent,…
-
0
votes0
answers141
viewsQ: Run youtube videos in a web view
Youtube videos do not play in A web view on Android 4.0, but in 6.0 videos run normally. I’ve done a lot of research on this topic, but I haven’t found any practical answers to my very low knowledge…
-
0
votes1
answer448
viewsQ: Download files to Webview on android 6.0
I am using the following code to download files in web view: @SuppressLint("InlinedApi")public void onDownloadStart(String url,String userAgent,String contentDisposition,String mimetype,long…
-
0
votes2
answers146
viewsA: How to close a running audio
With my changes my code was like this: Button play = (Button) findViewById(R.id.botão_play); Button pausar = (Button) findViewById (R.id.botão_pause); final MediaPlayer mp =…
-
1
votes2
answers146
viewsQ: How to close a running audio
I’m creating an application that performs a sound or a song, but I can’t make the sound stop. This way I am forced to stop the application manually so that the sound stops. How can I stop the music…