Posts by Dev • 673 points
41 posts
-
2
votes2
answers452
viewsA: Consume Webservices with Android - Retrofit or Volley?
Retrofit is one of the most powerful and popular libraries of HTTP Client for Android and Java. I would recommend using the Retrofit2. No doubt it will make your life easier when you study it,…
-
0
votes1
answer17
viewsA: Object appears at start (press) the Onlongclicklistener event and disappears at end (drop)
You can do this way using the event setOnTouchListener, within this event, you will come across the method onTouch that will rescue the action that the user is using, the ACTION_DOWN, for when the…
-
-2
votes1
answer235
viewsA: What command do I use to update my code every 2 seconds?
You can implement or approach something using threads to update your object every X seconds: protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); for(;;) { new…
-
0
votes1
answer52
viewsA: Is it possible to create a Widget with multiple configuration screens?
Apparently in your coddle you’re setting the setContentView for another Activity that is not within your Intent. Your: setContentView(R.layout.activity_widget_configure_1); And you’re trying to…
-
1
votes1
answer144
viewsQ: Yii2 PHP Framework get value Radiolist
Good would like to know how to get the selected value in the Radiolist of Yii2 Framework: <div class="row"> <div class="col-sm-2"> <?= $form->field($model,…
-
2
votes2
answers66
viewsA: How to create message sending method in Tabs?
You don’t deny using the findviewById because you are not using the root inflated layout, when you extend to a Fragment things are a little different from when you extend to an Activity, you have to…
-
1
votes3
answers915
viewsA: Random without repetition
Do it that way: private static ArrayList<Integer> repeat_list = new ArrayList(); private int inicial; private int finall; private int mostrarresultado() { inicial = editTextInicial.getValue();…
-
1
votes2
answers490
viewsA: Prevent button to be clicked twice on android
You will have to set the method of deactivating the event click button, so you can control when the user can click or not the button, in your case he can click again after the request of the…
-
1
votes0
answers124
views -
0
votes2
answers471
viewsA: Take programmatically generated Edittext values
First of all you will need to store all your Edittext in one View. After you store in a view and then go counting your children, you should use the getChild method to be able to pick up the children…
-
4
votes1
answer51
viewsA: Android does not find the local variable, but does not exist
I suggest that a CONTROL+SHIFT+F and do a full search for this variable, if you find it remove and your project will compile. If the variable in question does not act on your project, go to Build…
-
0
votes1
answer544
viewsA: How to create a mask for monetary value in an editText, real in case it format this way to save in the database "20.99"?
There is an event on android called addTextChangedListener for the EditText with the methods afterTextChanged that will do an action when the text is changed, beforeTextChanged which will do an…
-
5
votes1
answer84
viewsA: Problem with AVL tree vector
You’re forgetting to instantiate the vector lAVL[x] on that line add the instance: if(x == rest){ lAVL[x] = new ArvoreAvl(); lAVL[x].inserir(valor); } In your class constructor, you are setting the…
-
0
votes2
answers768
views -
1
votes2
answers53
viewsA: Loop counter is not incrementing
Try this way: List<Caneta> canetas = new ArrayList<>(); canetas.add(c1); canetas.add(c2); System.out.print(Arrays.toString(canetas.toArray())); for (Caneta caneta : canetas) {…
-
0
votes1
answer41
viewsA: error : while expected /eached end of file while Parsing
You opened keys after performing one of the while, as if it were a normal while, try this, remove that { only one who stands after his while: public class MainActivity extends AppCompatActivity {…
-
0
votes2
answers51
viewsA: passing parameters between activitys
Try it that way: 1° Canvas. public void Green(View view) { Intent it = new Intent(this, Main3Activity.class); it.putExtra("verde",cor3); startActivity(it); } And to recover: 2° Canvas. Intent it =…
-
1
votes3
answers1344
viewsA: ERROR: No Resource found that Matches the Given name: attr 'colorAccent'
Add to the Tyles: In the res/values-v21/styles.xml <?xml version="1.0" encoding="UTF-8"?> <resources> <style name="AppTheme"…
-
0
votes2
answers601
viewsA: Firebase - Child inside another Child
First you have to set the values you need, starting with your root, after root you go through the parent node and the parent you raise your desired child. Example: Firebase newRef =…
-
3
votes1
answer984
viewsA: Return list from a child in firebase
So, the problem is that you add a "key" to the string "profile, if you always have access to this key that comes before profile, you can make a comparison in Query: Query query =…
-
0
votes1
answer140
viewsA: Error generating APK - app:transformClassesWithDexForDebug
First of all a Clean Project in your project and after that add in your file build grandle.: defaultConfig { multiDexEnabled true }
-
0
votes1
answer45
views -
1
votes1
answer3946
viewsA: Share app link with Whatsapp
Good you will have to create a deep link and add in the manifest of your Activity, for example: <intent-filter> <action android:name="android.intent.action.VIEW"/> <category…
-
1
votes1
answer53
viewsA: How to specify the sequence of activities to be initiated?
You will have to make your other Activity be startled after the execution of your splash. But before that, put the <activity android:name=".SplashScreenActivity"> as first in the manifest.…
-
1
votes3
answers2405
viewsA: Is it possible to export the source code of an Android Studio project? How?
Rafaela Android Studio, does not have a function to "export" all the code, what I would recommend is to put your entire project in Github or something similar and leave public as I did in my TCC…
-
1
votes2
answers698
viewsA: How to make Linearlayout stay at the bottom of the screen?
The linearlayout let’s say they respect a hierarchy, if they are horizontal then they will be placed next to each other, if they are vertical they will be placed one below the other. The order is…
-
0
votes2
answers56
viewsA: Dynamically create Servicecontroller array
You forgot to instantiate the vectors before so is giving the Null Excption, try to put this before: scService[i] = new ServiceController("Simple Service"); Or: scService[i] =…
-
-1
votes3
answers422
viewsA: Allow only integers in a Jtable column
Using cast of Int you can do this validation: private int validateInt(float number){ if(number == (int)number) return number; else return 0 }
-
0
votes2
answers963
viewsA: Scrollview with Images and Linearlayout
In your case you have 2 children for scrollview, and it only accepts a child view for your hierarchy.. I will give an example in a correct and incorrect way. CORRECT <?xml version="1.0"…
-
0
votes1
answer101
viewsA: Error in the interlayer method elements with Mergesort in a List<Integer>
Arrays.asList(); It works as follows, if you have an object vector you want to allocate in a list as for example: int[] vet = new int[]{1,2,3,4,5}; List<int> list1 = Arrays.asList(vet); In…
-
0
votes3
answers2499
viewsA: How to check and print repeat values in a vector
The problem is that you are assigning an 8 value to N, let’s say your vector: vet[0] = -1.7 vet[1] = 3 vet[2] = 0 vet[3] = 1.5 vet[4] = 0 vet[5] = -1.7 vet[6] = 2.3 vet[7] = -1.7 So every time he…
-
1
votes1
answer42
viewsA: How do I know when the user touched outside of Edittext?
Using the method onFocusChange Voce may be doing this feature: editText.setOnFocusChangeListener(new OnFocusChangeListener() { @Override public void onFocusChange(View v, boolean hasFocus) { if…
-
0
votes2
answers374
viewsA: Why am I getting the error : android.content.res.Resources$Notfoundexception: Resource ID #0x0
Try to update this: cursos.add(document.select(".lin-area-c2").get(contador).text());}} For this: cursos.add(String.valueOf((document.select(".lin-area-c2").get(contador).text()));}}…
-
1
votes1
answer89
viewsA: How do I disable the third and fourth Edittext if the first is not filled in?
A simple case that might satiate your problem would be, in case by clicking on editText, it does these checks and validations for you editText1.setOnClickListener(new View.OnClickListener() {…
-
0
votes3
answers648
viewsA: Removing items from a Combobox
You could add these values within a list. List<String> lista = new List<String>(); And remove unwanted value var itemToRemove = resultlist.Single(r => r.item == "O"); // ou os valores…
-
1
votes1
answer59
viewsA: Add interaction in listview!
Okay, you have to have predefined values to do what you want. For example, if you click the value of a Ferrari in your listview, it consult a list or vector that brings the information you have…
-
0
votes2
answers903
viewsA: Exercise in C, printing of change
In this part of the code: do printf("Quanto de troco deseja receber? "); float f = GetFloat(); while ( f < 0 ); You forgot your keys, so you’re making a mistake. Do: do{ printf("Quanto de troco…
-
0
votes3
answers62
viewsA: Memory and processing - Variables and verification
Not the difference, the difference is only in reading the code. Many programmers prefer to put the return of a function in a variable before doing some processing with the same, some already prefer…
-
1
votes1
answer39
viewsA: Expandablelist comes hidden initially
I saw three options that might be making this happen, probably the visibility of the parent layout is like Gone or Invisible, may have some layout over the View,or the initialization of…
-
0
votes1
answer29
viewsA: Get Timestamp from Sqlserver
You have to select the database row, the way you are doing is not selecting. From a read in this article: https://andrielleazevedo.wordpress.com/2011/06/06/usando-o-comando-select-no-sql-server/ The…
-
1
votes2
answers467
views