Posts by Vitor Mendanha • 595 points
29 posts
-
0
votes1
answer201
viewsA: Google Maps Api in android app does not work in Play Store
In the Play Store, go to the "Manage App Subscription" menu and confirm that "Google Play App Signing" is enabled for the app. Also there you must copy the SHA1 key from the "Application Signing…
-
1
votes1
answer61
viewsQ: Calling more than one callback at the same time
I need a Workerclass that generates sequential numbers to print through a Callback interface these numbers in Mainactivity and a Segundaactivity when opened. My problem is that when Segundaactivity…
-
4
votes3
answers219
viewsQ: How to create a top numeric bar on your Android keyboard
Does anyone know how to create in Edittext XML that number bar on the keyboard?…
-
1
votes3
answers686
viewsQ: Programmatically change the background color of the Overflow Menu in the Toolbar
My application has an option that allows the user to switch between layout daytime colours and other layout night colors. My problem is that I don’t know how to programmatically change the color of…
-
1
votes2
answers161
viewsQ: How to round double values returned by Interface Location
I own a ArrayList that stores GPS coordinate objects and their elements are always being compared with the double values returned by the methods getLatitude() and getLongitude() of Interface…
-
2
votes2
answers157
viewsQ: Icon SVG created with Inkscape is not properly imported
With Inkscape app, I’m trying to create my own custom SVG icons and then import them to Android Studio. On import to Android Studio I get the following error message ERROR@ line 29 <defs> is…
-
5
votes1
answer311
viewsQ: How to order hours
I have the following method to sort a ArrayList String of Hours: public static void ordenaHoras() { ArrayList<String> horasList = new ArrayList<String>(); horasList.add("23:45");…
javaasked Vitor Mendanha 595 -
0
votes0
answers26
viewsQ: How to momentarily download the sounds of other applications
I’m using the Mediaplayer Class to play an alert sound in my app. My problem is that if the user is listening to music through another application, the sound emitted by my Mediaplayer Class may not…
androidasked Vitor Mendanha 595 -
0
votes1
answer73
viewsQ: Capture in Loop the value of a variable of another Activity
In my app, I have an activity called "GpsTrackerActivity" which is constantly calculating the distance travelled by the method onLocationChanged, of Interface LocationListener. My problem is that I…
androidasked Vitor Mendanha 595 -
2
votes2
answers567
viewsA: Google Maps does not load on the physical device
I was able to figure out what my problem was: I to export the APK file to a physical device could not insert the API-Key in the "google_maps_api.xml" file. I had it before inserting it directly into…
-
0
votes2
answers567
viewsQ: Google Maps does not load on the physical device
I created a Google Maps study application and in the Genymotion emulator it loads normally but on a physical device it does not load completely (I’m using Android Studio). Follow a screen print of…
-
2
votes2
answers185
viewsQ: Read XML file with only one Parent Node
I need to import an XML file that has the following structure: <?xml version="1.0" encoding="UTF-8"?> <Registos>3</Registos> <Socios> <id>1</id>…
-
0
votes0
answers75
viewsQ: Fill the entire screen area through Gridview cells
I have a project that has a Gridview with several cells and I need the cells that make up Gridview to fill the entire useful area of the Smartphone screen. With the following XML code it did not…
-
0
votes0
answers58
viewsQ: Android Studio - Error trying to open my old projects
I often get this error while trying to open some of my old projects that do not yet belong to Android Studio! Does anyone know the solution to this problem? Thank you. My Android SDK Manager:…
-
4
votes2
answers7398
viewsA: startActivityForResult() and onActivityResult() in Fragments
Example of the solution to my problem: Class Fragment_1: @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ...…
-
5
votes2
answers7398
viewsQ: startActivityForResult() and onActivityResult() in Fragments
I have a MainActivity that allows me to open two Fragments. The class Fragment_1 has a Button that in his Listener opens a second activity through the following call: Intent intent = new…
-
4
votes1
answer1016
viewsQ: How to keep the selected item color fixed
Adding the Istener to the Listview through the method setOnItemClickListener, every time you click on one of your items, it momentarily changes color. Is there any way to keep this color fixed on…
-
1
votes0
answers188
viewsQ: Arraylist<Hashmap<String, String>> in a Base Class
I have the following Arraylist: ArrayList<HashMap<String, String>> menuItens = new ArrayList<HashMap<String, String>>(); for (int i = 0; i < 6; i++){…
-
0
votes1
answer132
viewsA: Image captured from Sqlite gets black background in Imageview
I was able to solve my problem. The problem was in the code that converts the Bitmap image to bytes. I was saving the image as JPEG and could not. The image had to be saved as PNG. Here’s the…
-
0
votes1
answer132
viewsQ: Image captured from Sqlite gets black background in Imageview
In my application, I have the need to capture an image that is on a basis SQLite in format byte (Blob) and then convert it to Bitmap in order to display it in a ImageView. My problem is that the…
-
2
votes1
answer426
viewsQ: How to get the path to my Sqlite database?
I need my app to allow me to back up and re-store the data that is recorded in Sqlite. I followed some tutorials from the internet but I’m not able to make a copy of the data! String packageName =…
-
2
votes1
answer890
viewsQ: Change the Listview Background color when the key value is found
In my app I have a ListView which is provided through BaseAdapter. Then in the BaseAdapter i have an IF statement to change the list background when the value of a variable was equal to the value of…
-
1
votes1
answer80
viewsA: Activity with two Layouts and Edittext focusable
Easy, very easy: edittext2.requestFocus(); Here is the complete code: public class MainActivity extends AppCompatActivity { Button botao1; Button botao2; EditText edittext1; EditText edittext2;…
androidanswered Vitor Mendanha 595 -
1
votes1
answer80
viewsQ: Activity with two Layouts and Edittext focusable
My app only has one activity but with two Layouts. Switching between the two Layouts is done through a Button that exists in each of the Layouts. In Layout 1 there is a EditText of the kind…
androidasked Vitor Mendanha 595 -
2
votes1
answer221
viewsQ: How to recover Activity, instead of creating new, when you click on the notification?
In my app when activity goes to the state onPause I trigger her notifications via Notifitionmanager. I wish she could be restored to the state onResume if a click in the notification. Through this…
-
2
votes1
answer1074
viewsQ: Background Color of Listview in zebra
I have a layout with two Edittext and an Imageview that will be added to Listview via Basedapter. I wanted to change the background color of Listview in zebra. The problem is that if Listview has…
-
1
votes2
answers2551
viewsQ: Android - Cycle to check if a Checkbox is enabled or not
Within the event of a Button have a cycle while that is constantly checking the state of a CheckBox. The problem is that if the CheckBox is activated Activity freezes! Can someone help me in solving…
androidasked Vitor Mendanha 595 -
2
votes1
answer2332
viewsQ: Refresh activity after swiping your finger on the screen
How do I update the APP activity after the user swipes their finger down on the screen. How to detect this action to trigger an event in my code?
-
0
votes1
answer284
viewsQ: Actionbar does not show Icon
I’m using the Eclipse "Luna Service Release 2 (4.4.2)" to create my projects on Android. Whenever I create a project and run it, Actionbar does not show the icon that is set in the file…
androidasked Vitor Mendanha 595