Questions tagged as 'android'

1
answer

Visual error in WebView

To use a webview to expose my site, however on the sides it is with two white bars as in the photo. Code:@OverrideprotectedvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);setContentView(R.layout.activity_principal);...
asked by 03.04.2018 / 00:22
1
answer

How to share / pass data between activities without being by Intent?

I have an Android Studio application where, when I click a button, a number is generated in Activity A and stored in another button in Activity B, which is overwritten whenever I generate a new number in Acitivty A. It will be Is it necessary to...
asked by 14.03.2018 / 05:48
1
answer

SQL Server Integration with Android [closed]

I'm having trouble connecting to Sql Server and Android. When I try to communicate, the message "No address associated with hostname." I already did everything I needed, I downloaded Drive jtds, I downloaded sql server 2017, and I could not make...
asked by 09.03.2018 / 18:31
3
answers

Knowing that a button was clicked [closed]

I would like to know that a certain Button has been clicked, so it does not pass null validation. Here is the code: //OnClick da tela de registro btnRegistrar = (Button)findViewById(R.id.email_registrar_button); btnRegistrar.setOnClickListener...
asked by 08.06.2016 / 21:36
2
answers

Change Toolbar Back Button Color

How do I change the color of the Back Button (or Up button ) from my Toolbar? When I run the application it appears black.     
asked by 07.06.2016 / 20:31
3
answers

Save state when returning to an activity

I have a registration activity with 4 fields: 1 editText and 3 Spinners. At the click of a button the data filled in these fields are registered in the database and lead to another activity with an imageview of confirmation, which when passing 2...
asked by 11.03.2018 / 03:34
1
answer

Gif as background of an activity

I'm new to Android programming, and would like to add a GIF as a background of a Activity . Do I have to do this through Java or do I get XML directly? I am not able to set the Gif.     
asked by 28.02.2018 / 21:21
1
answer

Android - How to end / end an Activity?

How do I close, finish, end a Activity , after executing a method? In my project, I have two Activitys: MainActivity EditorActivity (Performs some simple tasks) I would like to end it, after calling the last method that complet...
asked by 24.02.2018 / 20:03
1
answer

What is the use of using BaseColumns._ID to define a contract class in SQLite?

Why should I use BaseColumns._ID instead of simply setting a String to _id ? For example, instead of using: public static final String _ID = BaseColumns._ID; Would not it be simpler to use this? public static fina...
asked by 25.02.2018 / 21:08
1
answer

What is the best way to display only two houses in a float in java

I'm creating a simple application in android studio, where I make a split and present its result in an EditText, however I'd like to present only two decimal places, what's the best way to do that?     
asked by 24.02.2018 / 22:04