Posts by viana • 27,141 points
761 posts
-
0
votes2
answers8830
viewsA: Error: Failed to find 'ANDROID_HOME' Environment variable
To set up the Android development environment Set the environment variable ANDROID_HOME based on the location of the Android SDK. Also, consider adding ANDROID_HOME/tools and…
-
2
votes2
answers21
viewsA: Last elements of a class running incorrectly
I made a change to your code by adding the .services-bloco in your CSS this way: .services-bloco{ width: 40%; float: left;} Test and check the code below: .main-pagina .services-principal {display:…
-
1
votes3
answers238
viewsA: I can’t center the text
Just you set the padding for his ul as 0px. See below the result: .content { position: relative; top: 110px; display: inline-block; margin: auto; text-align: center; font-size: 2.5em; line-height:…
-
5
votes1
answer112
viewsA: Collect all the Extras from an Intent
For those who are not yet familiar, the Intent's enable information to be transmitted from one screen to another, as the user navigates through the application. One Intent is an abstract description…
-
1
votes3
answers68
viewsA: Resize image with php
Better understanding your question, we have to use collision index rand() is very large. So to improve your code and decrease this collision rate it would be interesting to use time() concatenating…
-
2
votes1
answer1131
viewsA: How to implement voice and video calls in my apps
It is not a simple job when it comes to audio/video calls (so much so that after a long time Whatsapp implemented video calls). You can search more about SIP protocol on android which is available…
-
11
votes3
answers646
viewsA: What does it mean to put the 'as' command after the 'import' command in the code below?
According to in the documentation the as in import twitter as t: in Python means that you are creating an alias for the imported module. import without the practice of the: >>>import math…
-
2
votes1
answer781
viewsA: Problem to connect my device to Android Studio via Wi-Fi
You, without realizing it made a mistake when you used the door 555 when it would actually be 5555. To perform the procedure correctly, follow the steps below: Step 1: To connect the device via…
-
10
votes3
answers6900
viewsQ: What’s the difference between Return and break in a switch case?
In some situations it is necessary to practice the switch case for optimization and improvement of code. I have an application developed for Android using Java, which in case is used of both…
-
0
votes1
answer214
viewsA: Return error of Listview object list
You are trying to print the object in a list Aluno, however this is a ArrayAdapterwith a simple_list_item_1 which defines only one String. For these cases it is legal to create a Adapter customized,…
-
6
votes1
answer715
viewsA: How do I create an event when someone types something in Edittext?
You can use the addTextChangedListener(). See the code below: seuEditText.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable s) { // Aqui você coloca o evento } public…
-
1
votes3
answers219
viewsA: How to create a top numeric bar on your Android keyboard
You can set up a inputType for your EditText: <EditText ... android:inputType="textPassword|number" ... />…
-
1
votes1
answer272
viewsA: I can’t get some strings from the strings.xml
Do so by putting the method gerarQuestoes() within your onCreate(). Look how low it should be: private List<Questao> listaDeQuestoes; private ListView lista; private ArrayAdapter<String>…
-
2
votes2
answers162
views -
0
votes1
answer115
viewsA: Android Volley Multiple Requests in Parallel
There are several ways to request a Web Services, through code that might make it too extensive or through some Apis. On the other hand, perhaps it is a little personal to choose a good tool to make…
-
3
votes1
answer1466
viewsA: Visual Studio Code closes file alone
Maybe you are opening the file only in preview/preview and not editing. To make the tab fixed without closing, try to check this. On the other hand, you can enter settings/tools and adjust "Tabs and…
-
2
votes3
answers818
viewsA: How can I set the address as the street and neighborhood corresponding to latitude and longitude?
Option 1: Behold some examples how you can use Geocoder. But precisely for what you want, try using the function below that returns the location based on the LatLng past tense: /** * Obtem um…
-
1
votes1
answer36
views -
2
votes1
answer252
viewsA: Add Firebase to Android Project
According to the error, is missing dependency on your Gradle. To solve the problem, add dependencies to basic libraries needed for the services that is lacking at the beginning of your Gradle. Below…
-
1
votes1
answer49
viewsA: Does Firebase Analytics need to be initiated in all activities?
According to the notes of Version 9.8 - October 24, 2016 from the Firebase Android SDK the Automatic Screen Tracking (automatic screen tracking) is already supported by Firebase Analytics on…
-
1
votes2
answers126
viewsA: How do I know the time and date of a location with PHP?
Configure the date_default_timezone_set for Europe/Lisbon and see working here in ideone: date_default_timezone_set('Europe/Lisbon'); $date = time(); $date = date('Y-m-d', $date); $hour =…
-
0
votes2
answers2390
viewsA: Underline a word within a Textview
There are a few options you can join for a Textview, in which I will give some examples. Spannablestringbuilder This is the class whose content and markup can both be changed, considering it to be a…
-
4
votes1
answer191
viewsQ: isUserAMonkey() and isUserAGoat() methods
What is the real function of the methods isUserAMonkey() and isUserAGoat() in the Android SDK? In what situation they should be used?…
-
0
votes4
answers978
viewsA: Loop autoincrementing date
Kill a fly with a cannonball?! Well, I thought of a very simple way to solve your problem that would be you use strtotime(). See the code below: <?php function returnDates($parcelas,…
-
2
votes2
answers1348
viewsA: Problem with Google Maps API key
First to create credentials to access your activated Apis, see the details in the API documentation. Secondly, I’ll give you some tips below: Create API Key Step 1: Digital printing for…
-
1
votes1
answer305
viewsQ: Element fixed on top of the keyboard
I created a RelativeLayout property match_parent height so you can fill the entire screen. Inside it I insert a LinearLayout property alignParentBottom having value true to secure the element to the…
-
1
votes3
answers785
viewsA: Create Textview’s dynamically
You can try this way by defining a LinearLayout within the .xml: JAVA LinearLayout llayout = (LinearLayout) findViewById(R.id.linearLayout); for (int i = 0; i<selectedUser.interests.size(); i++)…
-
1
votes1
answer957
viewsA: Error while running Android Studio emulator
From what we understand, your file .ini is not in the default directory as it should be. Then you have to do a check of where you actually created your AVD (Android Virtual Devices). To show the…
-
1
votes3
answers556
views -
1
votes1
answer2310
viewsA: App Submission Problem in Play Store
It looks like you tried to load an APK for production that uses the M permissions model (level 23). This means you cannot do the downgrade for earlier versions. This is due to the changed…
-
0
votes2
answers3894
viewsA: Error message: "java.lang.Illegalstateexception: package not installed?"
The reason for granting permission INSTALL_PACKAGES, is related to installing applications silently. If the application does not have "permission from unknown sources" and successively does not…
-
8
votes2
answers1625
viewsA: When and why should we use SVG?
I learned how to vector "things" in Corel Draw, and this image business is not losing quality. (blabla) From the Lollipop (API 21), Android included the class VectorDrawable, to define drawables…
-
1
votes1
answer248
viewsA: Unsupported major.minor version 52.0visual studio 2015 community
The version number that is shown in the error describes the JRE version with which the class file is compatible. Unsupported major.minor version 52.0 According to the Wikipedia, the order of…
-
3
votes1
answer42
viewsA: Error using Lock Screen
The error is occurring because your DevicePolicyManager is not instantiated, so it returns null. You should be able to receive an identifier for the DevicePolicyManager as follows:…
-
2
votes2
answers1070
viewsA: How to fill Textview setText from an Arraylist?
According to your question, I will try to answer simply based on the data and code you have made available. As far as we can tell, you declared a variable of the type List<String> whose name…
-
3
votes2
answers62
viewsA: Misaligned images
The error you are making is in the property android:padding of your TextView. You are defining 30dp and 20dp. Try to keep uniform this value for both TextView's. <TextView…
-
0
votes1
answer1036
viewsQ: Generating unique identifier using time()
I created an algorithm to generate an identifier, which consists of a random value with 24 non-sequential characters. The goal is basically to capture the current time using time() and concatenate…
-
0
votes1
answer356
viewsQ: Return inserted value after INSERT
I have a following table: CREATE TABLE tblUser ( id INTEGER PRIMARY KEY AUTOINCREMENT, uuid VARCHAR(24) NULL, name VARCHAR(256) NULL } I’m inserting a uuid random to be a unique identifier directly…
-
4
votes2
answers4792
viewsQ: Check if it already exists in the table before entering record
I need to include a record in a table, however before inclusion to avoid duplicity it is necessary to do a check. As I have a column ID with as property AUTO INCREMENT, I can’t use the INSERT IGNORE…
-
0
votes0
answers340
viewsQ: Record date with thousandths of seconds
I have an application in which two users can update an item in the database, however I kept thinking about the following situation: If they click to sync at the same instant, including…
-
1
votes1
answer38
viewsQ: Create a query by checking two columns
I have a following table: tbl_mission id_misssao assignment status id_warrior id_creator When the user creates a mission, he can add this mission to himself or he can indicate another user (warrior)…
-
7
votes1
answer740
viewsQ: Sqlite and Mysql synchronization
I have an application in which I have a database using Sqlite and an external service using Mysql. Basically it’s a task application, where I can create a task in mode offline. When the user has…
-
0
votes1
answer59
viewsQ: Error: Firebase API initialization Failure
I’m making the following mistake: Firebase API initialization Failure. From this form, every time I send a notification through Firebase, the "crash app". Bundle dependencies { compile…
-
2
votes2
answers58
viewsQ: Linearlayout dimensions, defined in java, do not maintain proportionality between resolutions
I have a View in which I am programmatically defining its somersault and width in this way: LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) linear.getLayoutParams(); params.height =…
-
0
votes2
answers664
viewsA: Difficulty with Permission Location Android
Under conditions of Android 6.0(Api level 23) exists the Requesting Permissions at Run Time which is the issue of permissions, which is very interesting you give read and learn more. You have to use…
-
6
votes2
answers1767
viewsA: How do I change the color of Alertdialog
To change the properties of a AlertDialog, you must add style to the dialog box constructor: alerta = new AlertDialog.Builder(this, R.style.DialogStyle); This way you can create the configuration…
-
0
votes3
answers703
viewsA: Change native font size
You cannot change a size of standard source, but you can define a theme and where it is possible to change the font size. To learn more, you can read about Styles and themes in the developer Android…
-
1
votes2
answers3457
viewsA: How to create a chat app with Firebase and Android?
First step is configure a Firebase Cloud Messaging client app on Android. Then you can start using the Friendlychat. It includes both initial and final versions of Web code, Android, Objective-C and…
-
1
votes1
answer110
views -
10
votes4
answers14893
viewsQ: Advantage and advantage between onClick and setOnClickListener
I have a certain situation where we see that it is possible to create in the XML file a property called onClick: onClick: XML: <Button android:layout_height="@dimen/edittext_min_height"…