Questions tagged as 'android'

4
answers

Randomize

In my method I have a Random variable: public Bitmap getBmp(int nunidades,boolean base){ Bitmap bmp = Bitmap.createBitmap(ladoWidth * nunidades, ladoHeight, Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(bmp); int nbase =...
asked by 23.05.2017 / 12:27
3
answers

Shape does not apply correctly

I want to put this shape on my button but it is not being applied correctly, since in the middle there is a blank rectangle that does not show the edges of the shape. <shape xmlns:android="http://schemas.android.com/apk/res/android" android...
asked by 12.10.2016 / 16:44
1
answer

Create buttons on Android programmatically

I'm doing a project on Android and I want to add some buttons in one of my activitys, which must be added as the users create them, so I must be able to create them dynamically. I would also like them to change color according to certain user...
asked by 18.03.2016 / 17:39
1
answer

Android Studio generates 2 applications [duplicated]

I have my project in Android Studio and generating the apk is all right. The theme comes when I install it, the installation generates 2 applications of my project: one that goes to the LOGIN and the one that goes to another window of my pr...
asked by 01.09.2017 / 17:16
4
answers

Send data between activities

I have a problem. I have 2 activities, the main one and a second screen. I want the 2nd screen to send data to the main screen but when I start the application it tells me that it stopped and it closes. When I do it the other way around (From th...
asked by 30.11.2016 / 19:14
1
answer

How to copy a Sqlite database or file from internal storage to external storage?

How to copy a file or database from internal to external storage, sometimes we need to read files inside the internal storage ( data/data ), which is only possible if the device has root permission. In the case of a device that do...
asked by 15.06.2017 / 22:33
1
answer

Random and arrays

I was working with random and array and I had 2 doubts on the subject. 1) It is possible to create 3 arrays, each one contains images, and with a random one that chooses a random image of the array and at the same time that the array from whi...
asked by 04.07.2016 / 17:05
3
answers

Error: Your JAVA_HOME is invalid: C: \ Program Files \ Java \ jdk1.8.0_73

I have an error trying to compile my apk using the command ionic build android The error I think was generated when java sent the update today and stayed as half installed, the error is this: Error: Failed to run "java -version",...
asked by 28.07.2016 / 05:27
2
answers

Why does turning the device (from portrait to landscape or vice versa) close the fragment in which I am currently?

Good morning. I have a Activity that is a DrawerMenu (side menu), from which I make calls to different fragments, the problem I have is that when I access a Fragment and turn the device, it closes the Fragment and...
asked by 13.12.2016 / 20:40
3
answers

Can a pack of icons in png be used in Android? [closed]

I'm learning Android and I'm doing an application of time. Depending on the time I do I want to put a different icon, my question is if you can use the packs of icons that come in PNG in Android, or if I have to have an icon of each type in a di...
asked by 22.11.2016 / 08:31