Questions tagged as 'android'

1
answer

Continue running after accepting the Android Permission

I'm doing a test using Google Maps. It's working but it's this way. Once the app is started, it checks the permission by calling the Permission class. If the user accepts, the app starts and if it refuses the app to close with a message stating...
asked by 06.07.2017 / 21:00
1
answer

Result Web Service RETROFIT in Another Activity - Android

I have a Web Service method using the Retrofit library that can be queried from 2 different Activities. How can I use the result of the Web Service method that is in a class and display on an Activity? How can I also update a ListView...
asked by 06.07.2017 / 13:25
1
answer

How do I prevent the keyboard from playing with my layout?

How do I prevent the button from changing site when editText pulls the keyboard? Thanks in advance. xmlfromBhutan:<Buttonandroid:id="@+id/hora_picker" android:layout_width="300dp" android:layout_height="wrap_content" android:text...
asked by 07.07.2017 / 17:09
1
answer

Two spinners that can not have the same value selected

Hello, I have a code that has two spinners and if we select an option in a spinner in the other this option ceases to exist, what I did was: Whenever you click on the spinner it does clear and adds all and then removes what is selected in the ot...
asked by 26.07.2017 / 23:45
1
answer

Change specific Tab background programmatically

I have a TabLayout in which I create the tabs programmatically in this method: mTabLayout.removeAllTabs(); for(int i = 0; i < list(); i++) { mTabLayout.addTab(mTabLayout.newTab().setText(list(i).name), false); } TabLayout.Tab n...
asked by 31.07.2017 / 23:10
1
answer

Pass more than one parameter through URL

I have the following code: public interface service { @GET("?acao=R&tipo_refeicao={tipo}&data={data}") public void getCardapio( Callback<List<Cardapio>> getCardapio(@Query("tipo") int tipo, @Quer...
asked by 31.07.2017 / 23:41
1
answer

How to implement application rest in production? (Web or cloud servers) [closed]

I'm new to platform and I'm learning java doing a little android project that queries database, but I saw that android is not cool to communicate with database directly, so I learned to create an api rest using netbeans, tomcat and glassfish. So...
asked by 03.07.2017 / 22:46
1
answer

How to get position of inverted RecycleView?

I'm using a recycleview that takes data from a database (I'm using Sugar ORM) and I've reversed the order because I wanted the older ones for the older ones, but to delete I need the position in the database, I'm doing with swipe, and it picks u...
asked by 05.07.2017 / 02:45
1
answer

Spinner.setadapter on a null object reference [closed]

The array of players is populated with data but gives error in method setadapter . Spinner spinnerJogador1; ArrayList<JogadorModel> jogadores = jogadorRepository.SelecionarDisponiveis(); dataAdapter = new ArrayAdapter(this,...
asked by 04.07.2017 / 11:57
1
answer

Change the DrawableLeft property of a TextView

I have a SimpleAdapter that I use in a listview to show data that comes from the database. Follow the code below Map<String, String> map; for(int i = 0;i < buscaCombustivel.getCount();i++) { map = new HashMap<String, String>...
asked by 03.07.2017 / 17:09