Posts by Antonio S. Junior • 417 points
21 posts
-
0
votes1
answer1510
viewsA: How to get your own location (Latlng) in Android Studio
Suppose you are already using google play services and already connected (example below): if (mGoogleApiClient == null) { mGoogleApiClient = new GoogleApiClient.Builder(this)…
-
1
votes3
answers161
viewsA: Manipulation of Textbox
To break the string’s line just replace the "/t" bar with the backslash " n" txtCarros.Text += novoCarro.mostraModelo() + "\n"; txtCarros.Text += novoCarro.mostraPlaca() + "\n"; txtCarros.Text +=…
-
0
votes2
answers78
viewsA: How to refer to a String through various values in Java (Android)?
If I understood what you meant, you could do something like this: ArrayList<String> cumprimentos = new ArrayList<String>(); cumprimentos.add("oi"); cumprimentos.add("blz");…
-
2
votes1
answer402
viewsA: Is it possible to edit a project name?
Yes. Just change android:label="@string/app_name" in the application node in Androidmanifest.xml by the name you want to put. Example: <application android:name=".App" android:allowBackup="true"…
-
0
votes6
answers6243
viewsA: check repeated number inside the array c#
You are always comparing two equal numbers so the counter at the end of the accounts has the same length value. If you don’t want to change the structure of your code, I suggest making these…
c#answered Antonio S. Junior 417 -
1
votes1
answer28
viewsA: Which view was used in this layout
In this example Cardview was used with Recyclerview. There are examples from google to use their material design guidelines and some tutorials on the internet. If you want a tutorial, have this one:…
-
0
votes2
answers35
viewsA: Problems handling Vector Asset
You can set this value to default in your build.Radle: defaultConfig{ vectorDrawables.useSupportLibrary = true } and also puts appcompact in the dependencies: dependencies { compile…
-
1
votes3
answers218
viewsA: Textview when clicking , increase certain value that is in Edit text
This error happens when you pass some "null" value or parse cannot convert. It seems to me that you have some string "Name" in your app and he is trying to convert to Integer. A good practice when…
androidanswered Antonio S. Junior 417 -
2
votes1
answer1401
viewsA: Delete text in Edittext field
Set your Edittext to the value you want after your send action. In your case it would be: editText.setText("");
-
0
votes1
answer68
viewsA: getJsonObject bring specific field
Two ways to recur the name would be: 1 - filter.getJsonObject("cadastro").optString("nome", ""); 2 - JSONObject json = filter.getJsonObject("cadastro"); String nome = json.getString("nome"); In the…
-
0
votes2
answers51
viewsA: Android storage
There are some forms of persistence on Android. You can use either ready-to-authenticate Apis (like Facebook and Google), or simple databases like Android’s own Sqlite or even Sharedpreferences. An…
-
3
votes1
answer81
viewsA: To serve Exampleunittest and Exampleinstrumentedtest in Android Studio?
They are test classes. Exampleunittest is for unit tests, they are local tests and do not need an emulator or device to run. You can test methods in this class and create new unit test classes.…
androidanswered Antonio S. Junior 417 -
0
votes1
answer77
viewsA: Android - Method Invocation 'setOnClickListener' may Produce 'java.lang.Nullpointerexception'
It means that your Action in Textview can produce a null value error at runtime if it is initialized incorrectly. Many people had this Warning using other components like Float Action Button (FAB).…
-
1
votes2
answers231
viewsA: Multidimensional array in C# equal PHP?
Hello, good morning. For your second question, you can make a foreach this way: class Program { static void Main(string[] args) { string[,] array = new string[,] { {"nome0", "idade1"}, {"nome1",…
-
0
votes2
answers1950
viewsA: Close all the Activities
Have an example here [SOLUTION 2] that explains exactly what you want to know! Another way, if you close Activity and the app, could be: finish(); System.exit(0); on the button Switch.…
-
1
votes1
answer717
viewsA: Delete entity and all its relationships Hibernate
Take a look at this topic here: https://stackoverflow.com/questions/32146911/hibernate-throws-cannot-delete-or-update-a-parent-row-a-foreign-key-constraint Ps: Watch out for the comment that…
-
7
votes1
answer70
viewsA: The difference between * and *|*
You have the answer to your question here on this OS topic: https://stackoverflow.com/questions/34987370/what-is-the-difference-between-and-in-css But in advance for you. *|* represents the selector…
cssanswered Antonio S. Junior 417 -
0
votes1
answer94
viewsA: Insert multiple Entity Framework items
Could you change the primary key field? For example, use an Identity to generate auto key increment. [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public Int32 Id { get; set; }…
-
1
votes3
answers1999
viewsA: Is it possible to develop mobile multiplatform using Java?
There is the [Tabris] http://www.infoq.com/br/news/2013/09/tabris-mobile-multiplataforma But Tabris is company-oriented and has a paid license: "Tabris is not an open source framework, but corporate…
-
2
votes4
answers855
viewsA: Deserialize JSON
Well, I would make a structure like this: THE JSON: string seujson= @"{""data"":[{""Cditemprevenda"":""1"",""Cdproduto"":""8""},{""Cditemprevenda"":""2"",""Cdproduto"":""9""},…
-
1
votes2
answers1925
viewsA: What is Serialize and Deserialize for?
Serialize is the process of transforming an object into a stream of bytes! An example is to take a List<> and turn it into a JSON to manipulate somewhere and then turn it into a List again.…