Questions tagged as 'android'

1
answer

getText () returns null when trying to read the value of typed in an EditText

I have an EditText field and I want to save the Text in it by pressing a button I tried to do it using the following code but the string remains as null public void Botao (View view) { setContentView(R.layout.content_main_menu);...
asked by 12.01.2018 / 23:15
2
answers

NetworkOnMainThreadException error while retrieving device's local IP [duplicate]

String netAddress = "000.000.000.000"; try { netAddress = InetAddress.getLocalHost().getHostAddress(); } catch (Exception e1) { e1.printStackTrace(); } ipLocal.s...
asked by 23.04.2018 / 01:13
1
answer

change String.xml by java class

Hello, I was wondering if it is possible to modify a String from the values folder by a click of a button. these are String.xml <string name="app_name">FC MANAGER</string> <string name="goleiro_1">1 Diego Alves</string&...
asked by 03.06.2018 / 02:30
1
answer

Why pass arguments to a Fragment using Bundle instead of a set method

I recently asked myself a seemingly simple question that I could not answer and found no concise answer. The question is simple: Why use Bundle instead of a set method to pass parameters from an Activity to a Fragment? For example: Case 1...
asked by 13.03.2018 / 19:59
1
answer

How do I make the Button work only if EditText is populated?

I want you to just push the button after all EditText 's are filled package com.example.marcosnogueira.appnote; import android.support.v7.app.AlertDialog; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; impo...
asked by 22.10.2017 / 06:18
1
answer

Android Studio: Invisible problem? [closed]

Hello, I'm making an app to calculate the best buy between 2 products, in this case it's toilet paper. In the title I put invisible problem because android studio 3 does not detect any errors in the compilation, however, when I run the applic...
asked by 13.11.2017 / 15:46
1
answer

How to identify that the application has stopped working?

I need to save some data every time the application closes, I did this by overriding the onStop , onDestroy , onPause and it works, under normal conditions, more when the crash app does not execute none of these over...
asked by 29.08.2017 / 16:06
1
answer

Layout weigth does not work Android

I'm willing to let my <button/> and%% <ImageButton/> the same size "equal weight" but the command android:layout_weight="1" does not work like leaving the size of each different. <?xmlversion="1.0" encoding="utf-8"?...
asked by 30.08.2017 / 17:41
1
answer

Button with text Android [duplicate]

I'm developing a mobile application and wanted to leave my application looking like this ButI'mnotabletoputthetextunderneaththebuttonandputagraybackgroundcoloronthebuttonbecauseI'malreadysettingthebackground-colorofthebuttonwithanimage. &l...
asked by 28.08.2017 / 00:02
1
answer

Android start only my application

I do not know if this would be a programming problem, I think so ... I'm having a project to which the application I'm developing will be installed on appliances of a brand X, this app MUST be the only usable app, ie the user may not have power...
asked by 06.09.2017 / 01:13