Questions tagged as 'android'

2
answers

ListView with my images

I have 10 images and I want to put them with ListView . If it were a activity , it would already be done because I did it in an application, but now they are Fragment . String[] menuItems = { "Do some","kkk",",,,,,","Do s...
asked by 26.10.2016 / 20:15
1
answer

Is it OK to use a NOT NULL on a primary key in SQLite?

My question is, is it correct to define as NOT NULL in a primary call in a database SQLite for Android ?, example: ID INTEGER NOT NULL PRIMARY KEY     
asked by 30.08.2016 / 18:09
4
answers

Save JSON values obtained from Google Directions

I need to get the data from a JSON obtained through the API of Google Directions . I have this code, which apparently is correct: List<Route> routes = new ArrayList<Route>(); JSONObject jsonData = new JSONObject(data); JSON...
asked by 12.05.2017 / 01:52
3
answers

assert vs. null in Java

Often when I'm clicking code the Android Studio warns me that such a function can return @nullable, its recommendations are two: Enclose everything in an if you check if the object, variable, function is null or use the statement asser...
asked by 22.03.2016 / 18:04
3
answers

Background image in Android Studio

I want to know how I can add a background image in an android studio application, I have read that it should be in the drawable folder; but I do not know how to add the image to that folder. The image is downloaded from the internet.     
asked by 05.06.2017 / 05:35
2
answers

How can I play an Android TextToSpeech on the main speaker (where you hear calls) on the device?

I play the following code but it plays through the stereo speaker of the device: private TextToSpeech textToSpeech = new TextToSpeech(this,this); textToSpeech.setLanguage(new Locale("spa","ESP")); speak("Hola mundo" ); private void speak(Str...
asked by 11.05.2016 / 13:46
1
answer

Create a detailed view of a selected cardview in a recyclerview

I have followed this tutorial to create a list of cardviews and now I would like that after click on a cardview to start a new activity "cardview_detalle" in which to display the detailed information of the selected cardview     
asked by 19.05.2016 / 17:49
1
answer

Problem with Edittext inside Listview

Good afternoon I'm already finishing an app in Android Studio, I'm just detailing, but I find a detail that I have not been able to solve, what happens is that I have a listview with a custom view, in which in the custom view I have a...
asked by 18.05.2016 / 23:45
0
answers

Problem with Nine-Patch image in Android Studio?

I have this XML code for the APP interface: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" **android:background="@drawable/fond...
asked by 03.05.2016 / 17:11
2
answers

Problems when deploying Glide with GridView on Android

I have a problem when implementing Glide in my GridView, based on this page Glide    activity_index.xml <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.AppBarLayout android:id="@+id/main.appbar"...
asked by 22.12.2016 / 20:11