Questions tagged as 'android'

2
answers

How to make a button or a checkbox become inaccessible in android studio?

I would like to confirm the choices of both the buttons and the checkboxes, so that they become inaccessible / irresponsible / inactive. I know you can do this using if, but I think there should be some function that makes them "inaccessible....
asked by 22.03.2017 / 00:20
1
answer

Save image coming from API in mobile memory

I'm trying to save an image coming from the API into the phone's memory. public void saveSkin() { ivSkinSaver.buildDrawingCache(); Bitmap bm = ivSkinSaver.getDrawingCache(); OutputStream Out = null; try { File medi...
asked by 17.03.2017 / 16:39
1
answer

How to call an alertDialog within a fragment?

I can not call an alertDialog inside a fragment. At the time of setting the builder (this) it returns error. Here is the code: public void mostrarMsg(String titulo, String mensagem) { AlertDialog.Builder builder = new AlertDialog.Builder(t...
asked by 28.06.2016 / 14:09
1
answer

How to remove string stored in sharedPrefererences?

Good,  I encounter the problem of having a favorite list and need to remove it by clicking the favorite times item that is saved in the shared preferences. I have a list that is my favlist which contains json like this: {"0":"1016","horar...
asked by 13.06.2016 / 16:28
1
answer

Change variable of another class

I have two activity / classes, follow the button of my first activity where when I click go to the second activity: public void onButtonClick(View v){ if(v.getId() == R.id.Busuarios){ Intent i = new Intent(Velocimetro.this,Usua...
asked by 19.06.2016 / 00:14
1
answer

How to call a method that is inside my Fragment through the onclick of a button that is also inside the fragment?

How to call a method that is inside my fragment by java through the onclick of a button contained in the same fragment? Here is the code: public class FragmentMinet extends Fragment { @Override public View onCreateView(LayoutInflater inflate...
asked by 28.06.2016 / 14:59
1
answer

Mysql with android

I looked in various forums on how to integrate mysql with android, a very simple thing, like to list data from a saved table on an external mysql server. Using normal java I was able to do it using jdbc. I tried using the same with android bu...
asked by 01.06.2016 / 22:33
1
answer

Error picking the selected item in a Spinner and showing in a Toast

I'm new to android and would like to know where the error is here. I'm trying to display list data with a Spinner component. The Activity is like this: package sucesso.com.br.testecomponentes; import android.support.v7.app.AppCompatActivit...
asked by 25.11.2016 / 20:00
2
answers

How to use ScrollView and LinearLayout with full screen height?

I have my code: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tool...
asked by 15.10.2016 / 02:27
1
answer

How to use Recycleview in the snippet?

I do not know if I asked the question correctly, but come on, who can help me thank you:) This is my second MainActivity, I am doing an application with navigation drawer and in it to do the other screens of the menu I am using the fragments,...
asked by 19.10.2016 / 15:44