Questions tagged as 'android'

4
answers

Center TextView

I wanted to know how to center a textview, since the title of the app is outdated to the right and not in the center of the screen,  Thank you. <TextView android:layout_width="match_parent" android:layout_height="wrap_content" a...
asked by 05.04.2016 / 17:14
2
answers

Adjust the date using Calendar. AM-PM error

I want to create a Calendar object, but how can I take a given hour and minutes and adjust the date? Calendar c = Calendar.getInstance(); c.set(Calendar.HOUR,hora); //valores tomados de un TimePickerDialog c.set(Calendar.MINUTE,minutos); //val...
asked by 31.03.2018 / 00:57
2
answers

Kivy: Display a text saved in a variable

based on the example of this question I want to make a program that shows me a text saved in a variable, "g". There goes the code: # config from kivy.config import Config Config.set('kivy', 'keyboard_mode', 'system') #¿Para qué sirve esta lí...
asked by 15.04.2017 / 21:16
2
answers

In java, use a different class depending on the operating system

I have a system that works in multi-platform, and to be able to design it I need to know how I could run a class depending on the operating system. I have created the following simple function Public Boolean esandroid(){....} where if...
asked by 01.02.2018 / 15:47
2
answers

Android Fill in with decimals

I have a report where I show certain numerical values that come to me from a service x, My problem in particular is that if the number is 5.10 the service sends me 5.1 If I send 5.00 the service brings me 5 But if I send 5.23 if I ge...
asked by 16.01.2018 / 20:40
4
answers

How to make a switch in kotlin

I have the following example switch in java: int variable = 2; switch(variable){ case 1: //cosas break; case 2: case 3: break; case 4: //cosas break default: break; } What I want wi...
asked by 21.11.2017 / 20:04
2
answers

Control of Activities

Hello, I have the following problem. In a Activity I have a button that executes a AsyncTask . The problem is that if the app is completely closed, the operation is not executed. Is it possible to call an Asynchronous method when...
asked by 01.12.2017 / 16:05
3
answers

How to create new activity in AndroidStudio 2.3.3?

Hi, I would like to know how to create an activity in AndroidStudio 2.3.3, about 1 year ago I created activities with something similar to this: Intent i = new Intent(algo,algo); i.startActivity(); But I see that currently the startActivity...
asked by 17.06.2017 / 14:40
2
answers

Add icons to the Actionbar

I am looking for the following: put the icon and next to the title, as shown in the image where the Google Photos icon is and next to it says Photos . I have the following code: <?xml version="1.0" encoding="utf-8"?> <menu...
asked by 25.12.2016 / 18:21
2
answers

Problems Deleting Alarm

I have a problem with my Alarms, I can add them and modify them, but do not delete them. I create a person with image, name and alarm, at the time of deleting it, only the image and name are deleted, the alarm always remains activated. To...
asked by 18.01.2017 / 17:24