Posts by viana • 27,141 points
761 posts
-
1
votes1
answer66
views -
8
votes2
answers168
viewsA: What is Pushnotification really?
Push translated from English, means push, boost[...]. Already Notification, is notification, communication, warning[...]. Joining the two words, we have as an example "boost notification". The main…
-
0
votes1
answer160
viewsA: How to embed a custom map in Android?
You can customize the style of your map using MapStyleOptions through a JSON object in which you can put inside the directory raw. This is defined within the method onMapReady() in his Activity. See…
-
2
votes1
answer486
viewsA: Upload an image when opening the app on Android
What you really refer to is the presentation screen, or splash screen, is the home screen that is displayed when opening an application. Most applications feature the splash screens usually to…
-
2
votes1
answer167
viewsQ: Generate default . xls column file
I have a table with 5 columns, whereas the first one has a check box and the last one has a button to delete that particular row. The issue is that I want to export to Excel, in a file .xsl, but…
-
2
votes2
answers3400
viewsQ: Error: Unable to create 'C:/Myproject/. git/index.lock': File exists
Suddenly I went to "commit" my project, when out of nowhere appeared this message: Erro: Unable to create 'C:/MyProject/.git/index.lock': File exists. If no other git process is currently running,…
-
0
votes1
answer3993
viewsA: Convert dollars to real with Python
Rewriting your code according to a viable logic would look like this. The dolar U$ would be the current value multiplied by the quotation in R$. Basically this would be attributed to conversao.…
-
6
votes2
answers1240
viewsA: What is the purpose of the Recyclerview.Adapter class when using Recyclerview?
What is the purpose of the Customadapter class when using Recyclerview? Initially Adapter, or adapter, let’s say so, is responsible for making a display for each item in a data set. That is, one it…
-
1
votes1
answer896
viewsA: Change icones colors dynamically
For this case, if you prefer, you can only use XML. Simply create a <selector> with the name for example, item_selector.xml, using the state_check as true and insert into your directory…
-
6
votes1
answer866
views -
2
votes1
answer54
views -
8
votes1
answer4359
viewsA: Change android domain design
Translation and adaptation of Soen’s reply for this question about: Android Studio Rename Package. For example, to change from br.com.dominio-x for br.com.dominio-y, then do: In the Project Panel,…
-
6
votes3
answers8795
viewsA: How to round a number to the highest value in Mysql?
You can use the function ROUND(), passing the value and/or number of decimals as a parameter. See some examples: Passing only the value as parameter: mysql>SELECT ROUND(2.5); ->resultado: 3…
-
2
votes3
answers327
viewsA: How to get the variation of the dollar of the website Infomoney?
You can use the method explode as a parameter the line break and the first letter after the line break. See: $variacaoHTML = strip_tags($valorCompraHTML[6]); $variacao = explode("D", explode("\n ",…
-
5
votes2
answers818
viewsA: How to count the number of occurrences of a String in a Jsonarray?
Your logic is not all wrong, the problem is that you are putting inside the loop of repetition. So every time you search for a new item in JSON, your specialty array is reset. To solve this then you…
-
5
votes2
answers1376
viewsA: How to make a Login and Password system secure for Mobile Apps?
There are several data persistence levels in Android applications, in which you can save your authentication. One of them is SharedPreference, in which it functions as if it were a Session PHP, or…
-
1
votes1
answer183
viewsA: Ajax Success - actions at the time of Ajax’s response
You can use the window.location for redirecting in AJAX. See: if(sua condicao aqui dentro){ window.location = "index.html"; } If you want to redirect in PHP, you can do it this way: echo…
-
19
votes2
answers13776
viewsA: What’s the difference between Apache Cordova and Ionic?
Briefly, the Apache Cordova is responsible for making your Javascript code access native resources device, such as camera, GPS, accelerometer, among others. Already the Ionic is a framework that…
-
0
votes1
answer30
viewsA: Wrong stored and displayed information
Reset the variable value again marcas within the for. And use the method push() to add the object in its vector marcasVet. Behold: var marcas = {nome: '', fipeId: ''}; var marcasVet = []; for (var i…
-
1
votes1
answer775
viewsA: Add 'Swipe to refresh' to Webview
You can use the SwipeRefreshLayout and the NestedScrollView in its XML as set out in android.support.v4. See below how your XML would result: XML main:…
-
2
votes1
answer268
viewsA: How to Set a Home Screen Fragment for Android App
To define a fragment initial, just use the FragmentTransaction in his onCreate(). See below for an example: ExemploFragment fragment = new ExemploFragment(); FragmentTransaction fragmentTransaction…
-
0
votes1
answer61
viewsA: Add Marker with click
Within the method onMapRead just use the method setOnMapClickListener() including the settings of Marker, passing latitude and longitude. See: googleMap.setOnMapClickListener(new…
-
11
votes1
answer961
viewsQ: What makes Kotlin a language faster than Java?
I have read in some articles that Kotlin is faster than Java, but none of them exemplifies why. [...] As fast as Java". Kotlin - Evolve your Java Code (TDC-2016) Alex Magalhaes [...] Kotlin should…
-
2
votes1
answer576
viewsA: How to set a minimum date in the datapicker?
Use the method setMinDate. See an example, if you want to set the minimum date from the current moment, just do it this way below: datePicker.setMinDate(System.currentTimeMillis() - 1000); If you…
-
5
votes1
answer839
viewsA: Login with retrofit android
First you have to "serialize" the variables of your class Acesso. Take an example: public class Acesso implements Serializable { private static final long serialVersionUID = -2161110911377686463L;…
-
0
votes2
answers160
viewsA: Sharedpreferences - Firebase android
You have to save the received value when you enter the condition if the user exists. See: mPreferences = getSharedPreferences(PREF_NAME, MODE_PRIVATE); if (user != null) { SharedPreferences.Editor…
-
0
votes3
answers129
viewsA: How to make lists and cards equal to Trello
To create the card is used the CardView. See here in the documentation how to create cards. To create the side scroll is used a Swipe Views. See here in the documentation the guidelines for creating…
-
0
votes1
answer449
viewsQ: How to disable HTTPS in Centos Apache 2 installed on Amazon EC2?
I installed Centos an Amazon EC2 instance, and inserted an SSL certificate using Let’s Encrypt - Free SSL/TLS Certificates. It was all cute and it’s working perfectly. Look: Every time it’s inserted…
-
3
votes1
answer33
viewsA: Print with setInterval in the same place
Comes instead of append use html. And for it to be every 3 seconds, just set the interval to 3000. Behold: var x = setInterval(function() { $('div').html('<p…
-
3
votes1
answer202
viewsA: Change FAB color via code ( programmatically )
Of documentation: The background color of this view defaults to the your Theme’s colorAccent. If you Wish to change this at Runtime then you can do so via setBackgroundTintList(Colorstatelist).…
-
4
votes1
answer1191
viewsA: How to change font properties in javascript
As properties of a label in Marker are very limited. See below: - color string: Cor do texto - fontFamily string: Definição equivalente ao font-family do CSS - fontSize string: Tamanho da fonte…
-
0
votes1
answer53
viewsA: Error setItemOnClickListener after click
By giving yourself to realize, you create an object using the Map and inserts into each item of your ListView. Therefore, to recover the data, you should also use the Map. See below for an example:…
-
1
votes1
answer926
viewsA: How to check the internet before opening an Ionic app?
If it is IONIC 2, see here on own documentation about Network in which you need to use the method onDisconnect() to check whether or not it has a connection. According to the documentation,…
-
0
votes1
answer64
viewsA: change listview play in audio
Within getView in CustomMusicAdapter.java insert the following code below to give action to click of the item. See: viewHolder.itemView.setOnClickListener(new View.OnClickListener() { @Override…
-
1
votes2
answers370
viewsA: How to Change Linear Layout Transparency
Instead of: android:background="@color/colorPrimary" Place: android:background="#CC000000" This is a hexadecimal black with an 80% transparency. To put transparency, just set the first two digits of…
-
2
votes1
answer57
viewsQ: Detect Ellipsis
I have a following div with an image, the title and some options. See: .truncate { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } <div class="item thumb">…
-
1
votes2
answers710
viewsA: How do you line up a div inside another div and put 100% size buttons at the end of the div?
See if it helps: #botaologin { width: 100%; color: white; text-align: center; padding: 20px; } In the div father of the buttons has been set to style: display:flex; justify-content:space-around; See…
-
2
votes1
answer523
viewsA: API Google Maps + PHP
You need to insert an extra position in the variable $pt. Then you will have to compare the last position in which it was inserted. If $ig represented by beach[4] is equal to 1, insert a Marker with…
-
1
votes1
answer79
viewsA: Space between Imagebutton Android
Insert a margin into your ImageButton using the android:layout_margin. Behold: <ImageButton android:layout_margin="5dp" android:id="@+id/button5" android:layout_width="100dp"…
-
1
votes1
answer73
viewsA: How to set different icons on the map at the beginning and end of the route?
Just create inside the loop a repeat Marker different creating a condition to identify which first and last recorded coordinate. See below for what your code should look like: var image = new…
-
2
votes2
answers794
viewsA: Treat JSON by Javascript
I created a array within the for by entering the key and the key value. See: var parsed = JSON.parse('[{"1":"4"},{"2":"3"},{"3":"7"}]'); var arr = []; for(var x in parsed){ arr.push([parseInt(x)+1,…
javascriptanswered viana 27,141 -
0
votes1
answer130
viewsA: How do I know if a file exists in Storage Firabase?
You can use the method placeholder() while loading the image and method error() if an error occurs in the image loading. See: Glide 4.x: GlideApp.with(this) .using(new FirebaseImageLoader())…
-
3
votes3
answers883
viewsA: Validate whether INSERT was successfully executed or not (JTDS)
The correct to use the INSERT, UPDATE and DELETE would be the method executeUpdate(), in which it returns a value of the integer type. The method execute() works for CREATE TABLE or ALTER TABLE and…
-
0
votes2
answers1073
viewsA: How to filter only the date of a field that has date and time set?
Use strtotime() then passing the format you want it to return. For example date("m",$time) to redeem the month. See: $dateValue = "2017-02-04 10:00:00"; $time = strtotime($dateValue); $month =…
-
1
votes1
answer59
viewsA: Searching parameter by editText
Enter a type parameter String in the method loadJson() which will receive the value entered by the user: public void loadJson(String busca){ // aqui o restante do código. } Once done, enter the…
-
1
votes1
answer521
views -
9
votes4
answers865
viewsA: How to separate a string when the string does not have a separator?
You can use the split with regular expression like @Marquezani said, and another way to do this is to use toCharArray. Behold: String texto = "1234"; char[] numbers = texto.toCharArray(); //…
-
1
votes1
answer31
viewsA: How you notify in the Jsoup function
You can create a method using the Notificationmanager. As simple as possible, you would pass as parameter the title and subtitle of the notification. See an adaptation of your code: if(result !=…
-
1
votes1
answer105
viewsA: Change appearance when passing through Section
You can use the scroll touchmove. Take an example: $('.menu li').click(function(){ $('.menu li').css('background-color', 'green'); $(this).css('background-color', 'white'); }) $(window).on("scroll…
-
1
votes1
answer61
viewsA: Textview does not centralize on android 4.1.1
Change the property layout_width for match_parent. Instead of: android:layout_width="wrap_content" android:textAlignment="center" Place: android:layout_width="match_parent" android:gravity="center"…