Posts by viana • 27,141 points
761 posts
-
1
votes1
answer110
viewsA: Grab master key android studio to set up in parse
To Master Key (master key) is a security mechanism. Using the master key you ignore all the security mechanisms of your application, such as class level permissions and Acls. Having the master key…
-
0
votes5
answers1896
viewsA: Change Button Background
Programmatically you can use a flag. So you can declare for example, colorFlag = 0. So you can set the color using setBackgroundColor(). Every time you change click, you can change a different…
-
2
votes2
answers1306
viewsA: How to know the orientation of the screen?
To check orientation just use this code: getResources().getConfiguration().orientation There is a feedback for each type of guidance, which you can check below: ORIENTATION_UNDEFINED = 0…
-
6
votes2
answers2168
viewsQ: Compile and run project via command line
I have an Android application developed in Eclipse. I know it is possible to compile and run a project from the console, but I don’t know how to do it. The basic steps to compile a program JAVA is…
-
2
votes2
answers92
viewsA: "Refresh" from Fragment co listview
Suppose your ListView displays some data stored in a ArrayList. After changing the content of ArrayList, you need to tell the list that the data source had changed and it needs to redesign itself to…
-
3
votes2
answers235
viewsA: How to create an application without a title bar?
There are several ways, one of them is to define using the Window.FEATURE_ACTION_BAR passing by getActionBar().hide() in his Activity: Programmatically public void onCreate(Bundle…
-
1
votes3
answers301
viewsA: How to make the if-Else instruction work for reading integers
"S" and "s" are different strings. equalsIgnoreCase() checks whether the String is equal, ignoring different uppercase/lowercase letters. Example System.out.println("S".equals("s")); //false…
-
3
votes2
answers982
viewsA: Linearlayout Over Other Linearlayout
It is possible to insert a LinearLayout over another LinearLayout using RelativeLayout. The RelativeLayout is a layout that organizes its components relatively and is one of the Layout most used in…
-
0
votes1
answer58
viewsA: Static objects in Activities with View Pagers
There are a few ways to solve this your problem. , an alternative: Create an interface public interface MeuFragmentInterface { void fragmentBecameVisible(); } Attach ombudsman in…
-
2
votes1
answer153
viewsA: Images are repeating in Imageviews
You can do so by comparing whether the generated number already exists in the ArrayList: int totalImagens = 54; int totalEscolher = 10; ArrayList<Integer> numbers = new…
-
2
votes2
answers220
viewsA: Choose which Fragment will be shown in Activity
First it is necessary to create a condition to verify your questions If this email does not exist, I want to display a Fragment.. Try to create a method that returns a boolean with the name for…
-
1
votes2
answers129
viewsQ: Silent applications
Some applications or most of them have an "unassisted" or silent installation option, known as Silent install, which is to install an application without the user or support team needing to interact…
-
5
votes1
answer135
viewsA: Check click position on a Listview
You can use the method setOnItemClickListener() in this way: listItemView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view,…
-
1
votes1
answer1770
viewsA: Android Relativelayout align items
Puts his ImageView and the TextView within a LinearLayout with gravity=center and it’s all right, this way: <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content"…
-
13
votes3
answers41730
viewsQ: Difference between Visual Studio Community, Enterprise and Code
Intending to learn how to program C# and .NET for web and I came across a situation at the time of downloading the Visual Studio. I don’t know exactly which version to make download. What real…
-
4
votes3
answers3733
viewsQ: Set width and height in text box
To expand knowledge, I decided to start a new programming language, Python, and locked in the following situation, I have a screen with some elements and a text box of type Entry. To define the text…
-
7
votes2
answers1017
viewsA: Add new fields dynamically
Simple example of EditText with ListView: XML - { main.xml } <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"…
-
1
votes1
answer120
viewsA: Links within the application
First you need to address the issues of your button by inserting the setOnClickListener() in this way: buttonligar = (Button) findViewById(R.id.buttonligar); buttonligar.setOnClickListener(this);…
-
2
votes2
answers675
viewsA: Error while trying to start another Activity via a button
If in case you are using Theme.Holo.Light and do not want to use a ActionBar, then you can disable by changing your style.xml modifying the property windowActionBar: <style name="AppTheme"…
-
0
votes1
answer634
views -
7
votes3
answers525
viewsQ: Standardization of "String Resources" nomenclature
To support internationalization, the Android has "features" files called resource in XML, containing the texts to be displayed in the application. By default, the file /res/values/strings.xml has…
-
0
votes4
answers197
viewsA: Calling Gridview event in Activity
You can create a role in your activity to update the TextView, for example atualizaTextView(String value). There the moment you call your imgDelete.setOnClickListener you execute the method this…
-
1
votes1
answer46
viewsA: Problem with logging in using sqlite
Does not have rowid in your table. Check this row: idRow = cursor.getInt(cursor.getColumnIndexOrThrow("rowid")); Hugs.
-
4
votes1
answer61
viewsQ: Check if a "String Resource" is being used in the project
Situation When we do not use a variable in the file, the Eclipse has a feature that is to inform the developer by sending the following message: The value of the field Class.Clienteid is not used.…
-
1
votes0
answers35
viewsQ: Appcompat on project does not work on Android API < 11
Situation I have in my project the lib Appcompact in format .jar, but I can’t instantiate anything from the library: In the properties of the project I have the Java Build Path, however even marked…
-
1
votes2
answers275
viewsQ: Return values using Dialog’s
I have the following method dialogConfirme in which it contains a custom dialog declared as public static to return a value of the type boolean. The issue of static is so I can call any class using…
-
2
votes1
answer54
viewsA: How to delete Gridview image?
Within the setMultiChoiceModeListener create the variable to pick the position at the time you select from int, for example: int position =0; In the method onActionItemClicked you can use the…
-
0
votes2
answers1486
viewsA: How to change the checkbox color of a Multiselectlistpreference
You can customize through the style.xml, the result should be similar to this: <resources> <!-- Base application theme. --> <style name="AppTheme"…
-
2
votes1
answer177
viewsA: Place objects on image
The good way can be maybe by using the Canvas: Drawable d = getResources().getDrawable(R.drawable.foobar); d.setBounds(left, top, right, bottom); d.draw(canvas); Details Canvas and Drawable…
-
1
votes1
answer1113
views -
3
votes1
answer1726
viewsA: Change color of radio button
There are several alternatives, one of them is to create a RadioButton customized using two images: So you can create a radio_button_personalizado using them: radio_button_personalizado.xml <?xml…
-
0
votes2
answers1836
viewsA: Logged in android user
Android offers many ways to store data from an application. One of this mode is called SharedPreferences, that allow you to store and retrieve data in key form. See an example: public static final…
-
0
votes1
answer31
viewsA: Htacess rewrite does not open index
Try to do this way using Rewriterule and inserting ^(.*)$ / accompanied by the index.php. Then you can adapt it. RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}…
-
4
votes3
answers7106
viewsA: How to query a date range in mysql?
I usually do this way below. I use NOW() to pick up the current date and subtract in the 30-day range using INTERVAL 30 DAY. In the query i do the comparison if the creation date (created_at of the…
-
2
votes2
answers53
viewsA: Problem pulling server list on Android
Here’s what you’re gonna do activity_product_admin.xml create a Textview <TextView android:id="@+id/textResposta" android:layout_width="wrap_content" android:layout_height="wrap_content"…
-
2
votes1
answer42
viewsA: How to get the penultimate item of a string?
Thus: SELECT SUBSTRING_INDEX(SUBSTRING_INDEX('Antonio Alves Ferreira Castro', ' ', -2) , ' ', 1) penultimo_nome Hugs.
-
1
votes0
answers48
viewsQ: Concatenate text into a Progressidialog
Situation I have a following ProgressDialog defined with STYLE_HORIZONTAL in which it is executed after obtaining the size of a download of a file. In this way, I define its size using…
-
1
votes3
answers7852
viewsA: Align image to the right of the browser screen
Do it this way below will work out: #imgpos { position: absolute; right: 0px; width: 300px; border: 3px solid #73AD21; padding: 10px; } <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01…
-
2
votes1
answer2476
viewsA: Draw route over the street on the map
To create a simple app that finds routes between two places based on Google Map address, you can use Google Map Direction API. The Google Maps Directions API is a service that calculates routes…
-
2
votes3
answers414
viewsA: Custom dialog
You can create a file in which you will define how background. For example borda_redonda.xml, putting it inside your drawable, remembering that each corner can be set with different sizes. The edges…
-
1
votes1
answer814
viewsA: Implement message exchange between applications
In my humble opinion, since you are starting out, the interesting thing would be to do some more research in order to offer this kind of service to the public, which I believe in the future is your…
-
3
votes1
answer1218
viewsA: Animation when you touch the button
Below is a very basic and simple implementation possible. Remembering that to create an animation, depends a lot on creativity. So if you want to do amazing things, you’ll have to do a lot of…
-
0
votes2
answers1829
viewsA: Generate Secure API Subscription
The mistake 11101 refers to the preApproval data is required as stated in your error reply. In direct English translation of 'data is requered. 'means 'data is required' or 'data is required. As I…
-
1
votes2
answers1108
viewsA: Google maps android already open looking for current position
To open your map in a specific place you can use: CameraPosition cameraPosition = new CameraPosition.Builder() .target(new LatLng(-23.572847, -46.629716)) // Define o centro do mapa para localização…
-
3
votes1
answer334
viewsA: Timer with the Chronometer
To not reset the value you have to add the SystemClock.elapsedRealtime() with the time that was paused with the .stop() using any variable initialized with 0. Example: long tempoPausado = 0; Update…
-
5
votes1
answer707
viewsA: Notification icon in Android 5.0
Starting with Android Lollipop (5.0), Google made a "small" change in the style of the icons, so that it remains standard in a single color (and was warned that previous applications would change).…
-
1
votes1
answer352
viewsA: Firebase does not communicate with app
Yes, it may be that your firewall is blocking. Read this article from Implementation of the connection server protocol. If your organization has a firewall that restricts traffic to/from Internet,…
-
2
votes1
answer3332
viewsA: Troubleshooting for Error: Apache Shutdown unexpectedly
When httpd is started, it connects to some port and address on the local machine and waits to receive requests. This causes the server to accept connections on port 80 for an interface and port.…
-
0
votes1
answer87
viewsA: How do I change Activity after logging in with facebook?
From what I understand of your question, you can create a function to check if you are logged in by checking the token generated with the getCurrentAccessToken() through the class AccessToken. If…
-
0
votes2
answers102
viewsA: Adapter modified in real time
You can simply remove the desired item from the list using the method remove() of your ArrayAdapter. Where a possible way to do that would be: Objeto item = arrayAdapter.getItem([INDEX]);…