Posts by Thiago Luiz Domacoski • 7,310 points
323 posts
-
1
votes1
answer91
viewsA: Through this code there is some way to change the background color of each listview item
For this level of customization, it will be necessary to implement an Arrayadapter! Here’s an example, this is a new class: class Adapter extends ArrayAdapter<String> { private final…
androidanswered Thiago Luiz Domacoski 7,310 -
1
votes1
answer46
viewsQ: Fragmentactivity with Actionbardrawertoggle
I would like to create a Drawer with a Actionbardrawertoggle. I’m following this tutorial! My only change is that I’m extending a FragmentActivity and not a Activity as the example. When I run…
-
2
votes1
answer585
viewsA: Android Xzing library (read barcode) with Fragment
Calling for: Intent intent = new Intent("com.google.zxing.client.android.SCAN"); intent.putExtra("SCAN_MODE", "ONE_D_MODE"); startActivityForResult(intent, 0); Receiving: public void…
-
0
votes1
answer139
viewsA: Write data from a Barcode?
Good morning! It is interesting that I realize a question for every question: To receive and display in an Edittext, follow the excerpt: public void onActivityResult(int requestCode, int resultCode,…
androidanswered Thiago Luiz Domacoski 7,310 -
1
votes1
answer125
viewsQ: Animate Linearlayout with Layoutanimationcontroller
Good Afternoon! I have a Linearlayout that will be displayed when the user selects a Switch For this I created two methods, for fadein and fadeOut. Follow: private LayoutAnimationController…
-
2
votes1
answer69
viewsQ: Android server
I would like to know how apps like this, provide a web service through the smartphone? Is there a Tomcat that runs on Android? or something that does this? Ps.: Google showed me just the Talking Tom…
-
1
votes1
answer109
viewsA: Element of the Android List
Friend, The code is kind of big, so I created in gist: https://gist.github.com/Domacoski/5d067ecfaf4e091233bf It is a Fragment that displays a list of all mp3. Clicking on the item, it executes the…
androidanswered Thiago Luiz Domacoski 7,310 -
0
votes2
answers150
viewsA: What is Forcebrute’s logic of trial and error?
So from what you said, your code tests the same combination over and over again. One way to decrease is to store the combinations and check if it has already been tested. You can also use a…
javaanswered Thiago Luiz Domacoski 7,310 -
1
votes1
answer102
viewsA: I need to know how I use a . text as a database; I just need it to show the data contained in it
Come on! I’ll show you how to load a . txt from the Assets folder: create a file called dados.txt inside the Assets folder It will possess the following structure: item 1;descrição um;image1.png…
-
7
votes2
answers145
viewsQ: CAST: difference between "(String) Arg" and "String.class.cast(Arg)"
I wonder if there’s a difference between: String a = (String) arg; and the cast class: String a = String.class.cast(arg); I once heard that using the cast static class is more performatic, this is…
-
2
votes1
answer392
viewsQ: java.net.Protocolexception: many server redirects
I need to download a file .zip which is located at the following address: http://www1.caixa.gov.br/lotteries/lotteries/lotteries/D_quina.zip For this I created the following method: public static…
javaasked Thiago Luiz Domacoski 7,310 -
4
votes1
answer858
viewsA: How to change minSdkVersion on Android
In your project is set the minimum version as 21 minSdkVersion 21 Your device is Android 4.1.2 (API 16) right? Then change your minSdkVersion to 16. defaultConfig { applicationId…
-
4
votes1
answer222
viewsA: Android notification
The why appears, time yes, time no, it is a bit complicated! Sometimes it can be the version of the System, among others. Try it this way : final NotificationCompat.Builder builder = new…
-
1
votes2
answers1845
viewsA: How to recover the return result of a routine from within a Thread?
The variable is global, but cannot be accessed by different Threads at the same time. For this to happen, the global variable must be declared as volatile. To pass parameters from one Thread to…
-
1
votes1
answer203
viewsA: Google api v2, I already have the key, however, provided by third parties, how to enable without SHA-1?
You can generate a key without SHA-1: enter console.developers.google.com and generate a new Googlemaps key. If you leave the key field blank, requests from any Android app will be accepted.
-
0
votes1
answer63
viewsA: Textview does not update text inside an Arrayadapter
It is in this part that you add to the Arrayadapter? /** * Insert {@link QA} in the {@code arrayQA}. * @param qa: {@link QA} */ public void addNewQA(final QA qa) { activity.runOnUiThread(new…
-
1
votes1
answer135
viewsA: Pass extra parameters via gcm (google cloud message) - Cordova
Try to overwrite this Method in your Activity: protected void onNewIntent(Intent intent) Documentation:…
-
1
votes0
answers89
viewsQ: Pushnotification does not close [Android Wear]
My project has several types of notifications. I created an ENUM where I store the type and id of the Notification. final Intent intent = new Intent(getApplicationContext(),MainActivity.class);…
-
1
votes1
answer107
viewsA: android-support-v7-appcompat Do not generate . jar
I was able to find the error! All the architecture I’m using is 64bits and the eclipse was 32! With the right eclipse, everything worked correctly!
-
2
votes1
answer107
viewsQ: android-support-v7-appcompat Do not generate . jar
I’m importing the android-support-v7-appcompat project that lies on: '../Android/sdk/extras/android/support/v7/appcompat/' Configure it as reported in android documentation, despite not showing any…
-
2
votes1
answer85
viewsQ: Notification - Customize Actions
I wonder if it is possible to customize a Notification with your actions. Example: RemoteViews remoteViews = new RemoteViews(getPackageName(), R.layout.customnotification); Notification.Builder…
-
0
votes4
answers1258
viewsA: How to create an executable . jar?
Try exporting as Runnable JAR File: Export > Java >Runnable JAR File
-
2
votes1
answer138
viewsA: Orientation to Objects in Java
Buddy! Here the space is a little short to explain everything to you! I suggest some booklet ( http://www.caelum.com.br/apostila-java-orientacao-objetos/ ). This method you showed, it belongs to an…