Questions tagged as 'android'

1
answer

Error TextWatcher () does not work correctly

Hi there has been a problem with the TextWatcher class, I have tried to find solutions on the subject in this forum and English but I have not found what I was looking for, I have this piece of code in my method onCreate (): textoBuscado =...
asked by 24.09.2017 / 18:14
1
answer

Go to another Activity Android Studio [duplicated]

I have a problem with the following code: public void BotonAceptar (View vista){ Intent intent= new Intent (DadesPersonals.this, EAC1.class); startActivity(intent); setContentView(R.layout.activity_eac1); EAC1...
asked by 26.09.2017 / 10:01
1
answer

Prevent EditText from expanding with long text

I have a EditText and two buttons in a relative layout. The problem is that when writing a text that is too long in EditText , even if it fits, the text is displayed behind the buttons. I would like to know if you can limit it to wh...
asked by 26.07.2017 / 14:35
1
answer
2
answers

Make cast of complete apps

I've seen that there is a lot of code on the internet to add cast functionality to an Android app. However, they all serve to make multimedia content cast, but I would like to cast the entire app (that is, to see the app on television as it is)....
asked by 07.07.2017 / 06:37
1
answer

Detect Android 4.0 and 7.0 language

For an application, with the intention of detecting when the device is in Spanish, I used the following if : if(Locale.getDefault().getLanguage()=="es") However, although this has worked for me in the Android Studio (7.0) emulator, ch...
asked by 07.07.2017 / 05:40
2
answers

Android Calendar

I'm doing a date selector and when I select the date it starts in 1900, however the time starts at the current time. Is there any way that the date to choose starts on the current date? Code: public class MainActivity extends AppCompatAct...
asked by 07.07.2017 / 14:25
2
answers

Error: error: '' is incompatible with attribute android: layout_weight (attr) float. and "R" red

I have the following error: And this is the code he sends me to: <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="...
asked by 10.11.2017 / 22:18
1
answer

Remove space between LinearLayout and their children

My code is as follows: <LinearLayout android:background="#ea1a1a" android:weightSum="3" android:layout_width="match_parent" android:layout_height="wrap_content"> <Button androi...
asked by 26.06.2017 / 21:36
1
answer

The app is closed

The app is running but pressing a button closes the application. JAVA code: package com.example.calculadora.calculadorabasica; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View;...
asked by 14.06.2017 / 07:20