Questions tagged as 'android'

3
answers

How to exchange information between classes?

I want to pass information from one class to another for example: TextView t; I have a TextView here, called t and it is in the Main class. Now in the Main2 class: t.setText("TextView saiu da Main para a Main2"); I've already tried...
asked by 08.10.2014 / 22:29
1
answer

Mask of coins in the field

I would like to create masks in my android type field. I already managed to add the mask ###, ##. But this is not a good practice, because if I want to add a value of $ 1,000.00 the field does not accept. Has anyone ever had this or that?     
asked by 05.07.2016 / 14:23
1
answer

java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity

I am trying to make an alertdialog but it is giving error: 06-08 13:04:38.318 22518-22518/realsysten.com.br.sigarestaurante E/AndroidRuntime: FATAL EXCEPTION: main...
asked by 08.06.2016 / 15:14
1
answer

Calendar variable is not recognized by android

I'm declaring this in my project and can not recognize the calendar variable "Can not resolve symbol 'Calendar'" Calendar calendario= new Calendar.getInstance();     
asked by 13.06.2016 / 17:52
1
answer

Working with BACK buttons on the Navigation Bar (native smartphone) and Action Bar (added via Java)

I'm asking this question / answer to help anyone who might have had / have any questions regarding the BACK buttons that are extremely useful in our applications. I'll use 1 and 2 to differentiate Action Bar and Navigation Bar (2)...
asked by 18.04.2016 / 20:54
1
answer

How to call the startActivity () method on an Adapter?

So I have a problem that I redirect to another activity in the button click, but inside an adapter class I can not do anything, I can not call startActivity (). public class ProdutoRecyclerAdapter extends RecyclerView.Adapter<ProdutoRecycle...
asked by 22.05.2016 / 05:03
2
answers

Android application = Unfortunately project has stopped

I'm studying Android and I want to make a simple parameter pass for another Activity but the application is terminated in the emulator and the logCat shows a NullPointerException, can anyone help me? Class: public class MainActivity extends...
asked by 16.06.2015 / 14:48
1
answer

TextView does not update text inside an ArrayAdapter [closed]

I'm trying to update a text in a TextView inside the Adapter. The text is visually not appearing even using notifyDataSetChanged (). I use other visual forms such as enable disable components and they are working ok! On the TextView issue I corr...
asked by 17.06.2015 / 14:32
1
answer

Can I call a class that does only one controller record?

I have a class from an android application that does only the user registry and called it the UserController. In my view controller makes the communication between view and model, but as the class only makes a registration, I believe that it cou...
asked by 19.07.2018 / 01:29
2
answers

Animation when modifying LinearLayout height

I'm modifying the height of a LinearLayout of WRAP_CONTENT for 0 (zero) and vice versa by listening for the event onClick of a Button . I would like this change to occur gradually over a few millise...
asked by 19.02.2017 / 16:15