Posts by Danilo de Oliveira • 451 points
19 posts
-
0
votes1
answer623
viewsA: Delete recyclerView item from Adapter
Your Imageview with id "icone01" needs the property android:clickable="true".
-
0
votes1
answer146
viewsA: How to keep Mainactivity "feeding" map Activity?
In his MainActivity you are calling the method desativaGPS() within the onPause(). You could call him inside the onDestroy(). UPDATING For your MainActivity constantly update your MapActivity you…
-
1
votes1
answer50
viewsA: Loop loop in Listview
Whereas the vector nome has exactly the same amount of vector items telefone1, telefone2, local, nota, distancia; you can do it this way: public List<User> todosOsUsers() { List<User>…
-
2
votes1
answer53
viewsA: Removed items reappear on Landscape
What happens is that you need to implement a fragment called onSaveInstanceState() and save all data that you do not want to be "recreated" when rotating the screen, for example. And then on…
androidanswered Danilo de Oliveira 451 -
0
votes1
answer609
viewsA: Float Action Button does not get fixed at the footer with Collapsing Actionbar/Toolbar
If you have no problem putting your FAB in activity, you can do it this way: ... <android.support.v4.view.ViewPager android:id="@+id/viewPager" android:layout_width="wrap_content"…
-
0
votes1
answer37
viewsA: Problem with checkbox and Onitemclick event
You forgot to call notifyDataSetChanged(). public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3){ ItemListView item = adapterListView.getItem(arg2); item.setCheck(true);…
-
0
votes2
answers582
viewsA: cakephp controller using functions from another controller
To use a model from another controller, you can do the following: public function add() { ... Controller::loadModel('EmailModel'); $this->EmailModel->save(...); }…
cakephpanswered Danilo de Oliveira 451 -
0
votes1
answer60
viewsA: Update the database by clicking object without refresh
In general, you would need to create a endpoint/route on your system, which allows you to do the update you want by passing the id and the field value, and returning if the operation was a success.…
structured-programminganswered Danilo de Oliveira 451 -
2
votes1
answer3159
viewsA: Query sql with longer and shorter date limit
You’ll have to use function DATE() to convert the two dates to the "yyyy-mm-dd" format and compare them. So to get all today’s date records, you would have the following query: SELECT * FROM sql…
-
2
votes1
answer659
viewsA: How to finish an Activity from another class?
You can use a broadcast, which would serve as a system in your Activity. Whereas you are on an Activity B and are trying to close an Activity A. Activitya.java public class ActivityA extends…
-
0
votes1
answer164
viewsA: I can’t get value from the onSuccess (Uri Uri) method return
You will need to declare an instance of your DataProvider within the is and pass that instance to the method onSuccess(...), where you can assign the Uri to the correct instance of each…
-
0
votes1
answer119
viewsA: Sending data between Activitys with Putextra - Management
You’re putting the flag FLAG_ACTIVITY_CLEAR_TOP in your attempts to open activities 2 and 3. By placing this flag, you remove previous activities from your stack. If this is not the desired…
-
2
votes1
answer377
viewsA: Can’t set headers after they are sent - Nodejs
You are making two asynchronous requests before sending one res.send("ok") and within them, you send another res.send(...). What happens is that after you give an answer to the request on…
-
0
votes1
answer1013
viewsA: Send notifications from a website to android push notifications
On your server, basically, you need to do a post for that url (https://fcm.googleapis.com/fcm/send) with your server key inside the header Authorization and the Content-Type (for JSON is…
-
2
votes1
answer304
viewsA: How to take a user’s ID in a Listview and use as a variable in another Activity?
Within the method onItemLongClick(AdapterView<?> adapterView, ...) you must get the user and pass it inside the Intent to start the Activity. @Override public boolean…
-
2
votes1
answer200
viewsA: Error inflating class android.support.design.widget.Navigationview Android Navigationview
If the error is occurring, as you said, by inflating the layout in setContentView(R.layout.activity_main), it seems to me that it is because you have two views as Parent in the layout (LinearLayout…
-
1
votes1
answer313
viewsA: Edittext with same size Android
For each of the lines you have, you can group two EditText or TextView (or more, but at the risk of becoming extremely small) in a LinearLayout and set a maximum "weight" for the views within it…
-
0
votes2
answers57
viewsA: Activity giving crash
We have some problems here. Within the method choiceM() you are doing the check if the vector AçoMontante is equal to a string and will always give false in both conditions, because they are…
-
3
votes1
answer218
viewsA: Basic Nodejs Authentication
If you want this authentication to occur before any query, you must create a route that is compatible (through regular expression, for example) with the request Uri and place it at the beginning of…