Posts by daniel12345smith • 2,120 points
129 posts
-
0
votes1
answer85
viewsQ: How to share a text on facebook without having the app installed on Android?
I need to share a text and an image on facebook. On the net there are many tutorials that need to have the facebook app installed. Does anyone have any tutorial on how to do this without having…
-
0
votes0
answers192
viewsQ: How to represent an xml interface in a class diagram? (Android project)
I have an Android project, which I use several "xml" layout files as an interface. How should I represent them in the class diagram. I thank you already.
-
0
votes2
answers252
viewsQ: How to control the lighting (brightness) of Android via code for all activities?
I’m using the following code: //brilho try { //sets manual mode and brightnes 255 Settings.System.putInt(act.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS_MODE,…
androidasked daniel12345smith 2,120 -
2
votes1
answer501
viewsQ: How to pick up data after a 2 string separators in a select (SQL)?
I have a string where I store day, month and year, no field is required, and I separate the fields by a pipe |. If the user put only the day via staying "25", if put the day and the month or only…
sqlasked daniel12345smith 2,120 -
1
votes4
answers2422
viewsQ: How to open a keyboard when you "focus" on an Edittext?
I have an Edittext where I used the requestFocus() to get his Focus. I put the setFocus(true) and the setFocusableInTouchMode also. When I open Activity, requestFocus() works, but does not open the…
androidasked daniel12345smith 2,120 -
1
votes1
answer177
viewsQ: Disable GPS via code on Android 4.2 up?
How can I disable GPS via code, without user intervention?
-
0
votes1
answer317
viewsQ: Why is the Locationlistener onLocationChanged so inaccurate?
I’m working with Android gps. I’m using the LocationManager.GPS_PROVIDER and it is giving me very bad points, far away from my location. Has anyone ever worked with this tool? is normal? I thank you…
-
0
votes1
answer240
viewsQ: How to change the text size and padding tabs in tabHost?
I have a tabHost and I needed to change the padding and the size of the texts in the tabs. Does anyone know how to do this? via code or via xml? Thanks in advance.
androidasked daniel12345smith 2,120 -
2
votes2
answers61
viewsQ: How to update the background colors of the lines of a listview?
I have a listview that when I click on a line, it sends information to the server that returns a status. I needed to change the color of the line in my Adapter based on this information. How do I…
-
0
votes1
answer24
viewsQ: How to prevent the line from losing the color reference in Expandablelistview?
I have an Expandablelistview with 5 groups and each group has their children (Child). I changed the background color of some children, but when I use the scroll mess all the lines, painting…
-
0
votes1
answer88
viewsQ: How to change the message "x app stopped working" on Android?
I needed to change this text from my app, someone knows how? depending on the smartphone/tablet model the message comes different. Thank you in advance.
androidasked daniel12345smith 2,120 -
0
votes1
answer50
viewsQ: Is it possible to install an apk without user intervention by putting prompt commands in the codeword or something?
Actually, it’s update I need to do, does anyone know if it’s possible to do this without user intervention? I just inform that there is an update close the application and update alone. I thank you…
androidasked daniel12345smith 2,120 -
4
votes3
answers1366
viewsQ: How to install an APK remotely? (how Googleplay updates apps)
I made a service to download an updated version of my application when it exists. I would like to display a message on the screen warning that there is an update and install/update behind my…
androidasked daniel12345smith 2,120 -
0
votes1
answer1266
viewsQ: How to update an apk without uninstalling the current one?
Google play apps updating without the need to uninstall. Does anyone know how the google update works? Thanks in advance.
androidasked daniel12345smith 2,120 -
1
votes1
answer62
viewsQ: How to create a shortcut to open a website in the browser?
I need to create a shortcut to open the browser with the address (in this case, Chrome).
androidasked daniel12345smith 2,120 -
0
votes3
answers75
viewsQ: In a String separates with data separated by ";" how to take the 2nd data?
I have the string x = "Alberto;Jose;Felipe;Ana". I needed to take the 2nd dice, how do I do that? I thank you already. Obs: The string x is inside an array of strings.
javaasked daniel12345smith 2,120 -
0
votes0
answers51
viewsQ: How to send a die with the "setResult" of a non-activity to an Activity?
I have a class with a dialog that is not an Activity and the result of this dialog I need to update in Activity. To do this I am passing the Activity via constructor to the dialog, but it did not…
androidasked daniel12345smith 2,120 -
3
votes2
answers872
viewsQ: How to leave a Alertdialog with rounded edges?
When I want to make a Dialog customized I just put one layout inside it. But around it Dialog is square, someone knows how to round?
-
0
votes1
answer1029
viewsQ: How to Implement "zoom in" and "zoom out" for imageView on Android?
I have an Activity where I display an image in the screen size, but I needed to implement the zoom in the image, the same zoom as the Android system that has in all galleries and browsers Android.…
-
1
votes1
answer133
viewsQ: How to dim the size of a Blob image?
I have an image in Blob in the bank, it is in high resolution, I needed to decrease the resolution of it. Does anyone know how to do this? I thank you already.
androidasked daniel12345smith 2,120 -
2
votes2
answers92
viewsQ: What is the name of the bar menu that youtube, whatapp and other apps use?
It is a menu where the options appear on the left side, just like in this image: I would just like to know the name of the menu to implement. I thank you already. and this:…
androidasked daniel12345smith 2,120 -
10
votes2
answers938
viewsQ: Using hashcode as id is good practice?
I have a short list of strings (where the strings will never repeat themselves) and would like to use hashcode as id, is a good practice?
javaasked daniel12345smith 2,120 -
2
votes1
answer191
viewsQ: How to convert a String into an id or numerical data?
I have strings that are unique and would like to create an id from it. Does anyone know how I can do? Thank you in advance.
javaasked daniel12345smith 2,120 -
1
votes1
answer689
viewsQ: How to put a scrollView inside a Textview if I already have a scrollView in the layout?
I put a scrollView in the layout and still needed to put a scrollview in Textview, but only one of them works, if I already have the layout, textView does not work. Does anyone know a way to leave…
-
0
votes1
answer927
viewsQ: How to add borders to the columns and rows of a Tablelayout via code:
I created a table, but I need to add rows and columns to the table via code. Does anyone know how I can do this? Thanks in advance. How I need you to stay:…
-
3
votes1
answer411
viewsQ: How to zoom in to a View image?
I am looking for the implementation of a zoom on the internet but do not think. I found just a zoom that is applied across the image. I needed this default zoom that you have in most apps that…
-
2
votes2
answers194
viewsQ: How to open an image inside an Imageview in its original size?
I have some images within imageView, and I needed to open these images in the original size when I click on them. Does anyone know how to do that? Thanks in advance.
androidasked daniel12345smith 2,120 -
0
votes0
answers32
viewsQ: Is there setSelection in Tablelayout or Tablerow?
Listview has the method setSelection() where you can select an index from your list to point at this index when you open the list. For example in a Listview with 100 numbers, if you put…
androidasked daniel12345smith 2,120 -
0
votes1
answer340
viewsQ: How do you leave a Tablelayout on a fixed screen size?
I have a screen where it has a title, a table and two buttons at the bottom of the table. I put the table inside a scrollView. However, when the table is filling with lines, it will take the place…
androidasked daniel12345smith 2,120 -
0
votes0
answers92
viewsQ: How to set the index of a spinner?
I have 3 spinners that I am using for filters, in my application each column has a filter, name, age, city, when I click on the age filter, I will choose an age, for example 12 and the age will be…
-
0
votes1
answer40
viewsQ: How do I adjust the views to make them small independent of the device?
I made an application where I create part of the interface in xml and part via java code, the xml part works in any application adapting the screen size. The part via code in a 7.8 inch device is…
-
2
votes1
answer915
viewsQ: How to change the size of an Android imageView via code?
I tried using Layoutparams but it didn’t work, I tried layoutParams.width = 80; and it didn’t work. Does anyone know how to do that? I thank you in advance. In my case the picture got too big I…
androidasked daniel12345smith 2,120 -
0
votes1
answer2075
viewsQ: How to call a method another Activity in my Activity?
I have a activity A and a activity B. Activity A has the method metodoUm and I needed to use this method on Activity B. Does anyone know how I can do this? I would be very grateful. I’m getting…
-
2
votes2
answers1159
viewsQ: How to limit the number of houses before the comma in a regular expression?
I am using this expression to not let the user type point before any number and limiting 2 houses after the comma, but I also needed to limit 5 houses before the comma, the way it is I can enter as…
-
-1
votes1
answer156
viewsQ: How to prevent Double from turning a large number into exponential?
I have a system of calculations in my app, I use Textwatcher and when I calculate a large number saved, when I return the value, it comes in exponential (123e+23). I tried to use bigDecimal but it…
androidasked daniel12345smith 2,120 -
1
votes2
answers125
viewsQ: How to receive two data in a listview but present only one and use the other in the click?
I have a listview where I list people’s names and when I click on a person I use the adapter.getitem(position) who takes the person’s name, however, I needed to get the person’s id and not the name.…
-
1
votes1
answer185
viewsQ: How to leave a Dialog with rounded edges (edges) via code without using xml?
For layouts, Buttons and Edittexts I use the class ShapeDrawable more specifically the RoundRectShape and it works perfectly, but for Dialogs and Listviews it doesn’t work. Does anyone know what to…
androidasked daniel12345smith 2,120 -
2
votes1
answer174
viewsQ: How to know what "MATCH_PARENT" will look like when the view is drawn?
I’m using this code: LayoutParams par = new LayoutParams(40, LayoutParams.MATCH_PARENT); The second paramentric, the LayoutParams.MATCH_PARENT which represents the height is the size of a horizontal…
-
2
votes3
answers1110
viewsQ: I have 5 threads running in parallel. How do I know when they’re all gone?
If I make one join for each of them, they will perform in sequence, one at a time. I needed to start the 5 in parallel and know when they all finished to do something. Does anyone know if and how…
-
1
votes2
answers724
viewsQ: How to change the color of a Listview item while it is being pressed?
By default, when you click on an item, it changes color at the time of the click, but I changed my listview and this click is not working. Does anyone know how to implement it if it is some ready…
-
2
votes1
answer187
viewsQ: How do I let "bind" to "Sqlitestatement" accept a null value in Sqlite?
I decided to use Sqlitestatement because it is faster to insert data in Sqlite, but at some point a null value can come object.getAlgumthing() and in this case an error with the message that the…
-
2
votes0
answers202
viewsQ: Does an Android service lock the application even running in the background?
Does an Android service lock the application even running in the background? Or is there something wrong with my application? I have a database where the last table has 3,000 lines. With this I…
-
1
votes1
answer66
viewsQ: How to put a scroll inside tabHost (asbas) on Android?
I have a code that creates tabs on the screen as needed, the problem is that when I create a lot of tabs they get "squeezed" on the screen and cuts the rest on the tabs. I’m doing this all via Java,…
androidasked daniel12345smith 2,120 -
2
votes3
answers552
viewsQ: How to convert pixel to dp?
I made an application that is a form, and I did everything via code without using xml, so my textViews and Edittexts were in pixels. No tablet works well, but mobile with smaller resolution was all…
-
2
votes1
answer126
viewsQ: Is there any way to start a Thread that is in a method in another class?
I have a method and within it a thread, I needed to "startar" it from another class and then check when Thread ran out. Is it possible to do this? my code: Thread th; public void inserir(){ th = new…
-
1
votes1
answer1505
viewsQ: How to run multiple threads sequentially?
I have to run a thread x and let the thread y start only when x is done, regardless of how long it will take, and then run z only when y is done. Does anyone know the best way to do this? Thanks in…
-
0
votes1
answer69
viewsQ: How to kill all dialogs on the screen at once?
I do a check and play 3 dialogs on the screen, but if the user cancels one of them, they should all close. Does anyone know how to do this? I don’t even know if it’s possible. I thank you in…
-
0
votes0
answers316
viewsQ: How to change the scroll speed of listview?
The default listview scroll is very fast, and as I turn off the "Recycle" of my listview because I am painting some items, I realized that it is getting slow when I swipe over the list. Does anyone…
androidasked daniel12345smith 2,120 -
2
votes1
answer1523
viewsQ: When I use a "Finish()" to terminate Activity Android uses some Activity ending animation by default?
Because I would like to put a different animation, and if I put an animation before putting the finish() executes the animation and then Finish with its animation.
androidasked daniel12345smith 2,120 -
4
votes2
answers681
viewsQ: How to display a Toast inside a Thread on Android?
I’m developing an app and I needed to display a Toast at some point within a Thread, but I’m not getting it, does anyone know how it’s possible and if it’s possible to do so? Thank you in advance.…