Questions tagged as 'java'

1
answer

Show only People with a specific value (Firebase)

I have a recyclerview that I charge from a database that I have in Firebase , I do it like this: databaseReference.child("Personas").addChildEventListener(new ChildEventListener() { @Override public void onChildAd...
asked by 08.06.2017 / 23:32
1
answer

Android 23 and under do not fill all screens in landscape mode

I make an application that uses dynamic tables, my XML code is: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" an...
asked by 13.06.2017 / 18:23
1
answer

List the number of records in Java

How can I list the number of records that appear in a program? It is assumed that the user enters the number of records you want, once this is done, the data is output but they need to be listed. import java.util.*; public class practica1Labor...
asked by 13.01.2017 / 07:44
1
answer

Attach (Render) text to a Drawable on Android

I've done some research on the net and found this class here: link public class TextDrawable extends Drawable { private final String text; private final Paint paint; public TextDrawable(String text) { this.text = te...
asked by 08.06.2017 / 17:38
2
answers

Prevent sliding gesture in an Android ViewPager

How can you disable the scrolling of ViewPage pages when a swipe gesture is made?     
asked by 08.12.2016 / 10:23
1
answer

VOLEY, sending all the data from a SQLite table

I want to send all the data of the SQLite database in the following way: @Override protected Map<String, String> getParams() throws AuthFailureError { Map<String, String> parameters = new HashMap<String, Stri...
asked by 10.12.2016 / 05:02
2
answers

How to optimize the validations in a registration form?

I am making a registration form on android, I use several if blocks to validate each field and then insert the information into a database (I have solved this already), I would like to know if there is any way to optimize or improve my code. p...
asked by 10.02.2017 / 09:13
1
answer

F1 JavaHelp key

In any program or application, most of the times when pressing the F1 key, a help system is opened referring to that utility. I am in my project and I have created a help system, which should be opened by pressing F1 but not ... 1) Fail to pr...
asked by 08.01.2017 / 22:11
2
answers

Pass ResultSet to a JSON in Java JSP

My query is to know how I can pass a ResultSet from SQLServer to JSON, since I am working with JavaScript libraries (ChartJS) to generate graphics for a dashboard and it only reads data in that format. package DAO; import conexion.Conexion; i...
asked by 07.01.2017 / 01:09
1
answer

Get the dimensions of an image in Android?

I'm trying to work with the width and height of an image. I use this code to get the image, convert it into a Bitmap and then into base64. private void PickFile(){ Intent intent = new Intent(Intent.ACTION_PICK, android.provider.Medi...
asked by 21.11.2016 / 19:03