Questions tagged as 'android'

1
answer

record count with Room and LiveData in android studio

How do I call this function in the viewmodel adapter: @Query("select * from PRODUTO") int getCountProdutos(); My viewmodel: public class ProdutoListViewModel extends AndroidViewModel { private final LiveData<List<PRODUTO>> it...
asked by 28.05.2018 / 16:05
1
answer

How do I send multiple values to a single Activity

Good morning, I have the following situation: I have 4 screens (Activity), they are: MainActivity, DisiplinaActivity, AssessmentActivity, and Final ResultActivity. The point is, the data collected from the DisiplinaActivity and Evaluati...
asked by 28.05.2018 / 14:22
1
answer

Problem with updating a Fragment

I'm learning Android and when trying to develop an application I came across the following situation: I have an Activity that has two Fragments: ReminderListFragment and FilterListFragment . The first fragment has a list of Remin...
asked by 21.05.2018 / 15:51
1
answer

Shared preferences saving wrong integer

I'm saving the user code (an integer) in the shared preferences: String a = Integer.toString(pUsuario.getCodigo()); SharedPreferences.Editor editor_Codigo = oCodigo.edit(); editor_Codigo.putString(pContext.getString(R.string.cod...
asked by 18.05.2018 / 15:42
1
answer

how to show video loop in videoview no android studio

I have a videoview in my android application and the background video is set that way String uri = "android.resource://" + getPackageName() + "/" + R.raw.oceans; VideoView mVideoView = (VideoView)findViewById(R.id.video_login); if (mVideoVi...
asked by 14.05.2018 / 21:03
1
answer

Display data list in order of date. Firebase

Hello, I have a firewall how to bring the data from the firebase and display in order by date, display from the most recent to the oldest, currently the data is being displayed in the default firebase. database = ConfiguracaoFirebase.getDataba...
asked by 15.05.2018 / 02:11
1
answer

Android message appears in the security configuration log

I have an application that does query data in a WebService using JSON. When I run my application I get the following message in the logs: D/NetworkSecurityConfig: No Network Security Config specified, using platform default Is this an error...
asked by 13.05.2018 / 23:30
1
answer

Navigation between pages (Android) [closed]

using Android.App; using Android.Widget; using Android.OS; using System; namespace ValModas { [Activity(Label = "ValModas", MainLauncher = true)] public class MainActivity : Activity { protected override void OnCreate(Bundle...
asked by 10.05.2018 / 07:46
1
answer

Android - Hide ActionBar buttons

I made a code so that a button when pressed shows an EditText. However, I was only able to hide the title and icon of the application. So how do I hide the buttons too? MainActivity.java: package com.mycompany.myapp; import android.app.*;...
asked by 11.05.2018 / 20:52
1
answer

Error: android.widget.LinearLayout can not be cast to android.widget.GridLayout

I'm trying to make an android app that lists the components coming from the bank. The error is as follows:    AndroidRuntime: java.lang.ClassCastException: android.widget.LinearLayout can not be cast to android.widget.GridLayout FILE N...
asked by 14.09.2018 / 05:33