ImageButton shows nothing in RecyclerView

I have RecyclerView include ImageButton play each item. But when I run ImageButton show nothing. <Button android:src="@drawable/ic_speaker" android:id="@+id/play" androi

Why does the ListView object return a null value each time?

I tried to fill a ListView with data, but the app crashes every time. The ListView returns null all the time . Here is my Fragment code @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { list

Android Create a button automatically when data is received

So I have an android project that gets data from php using JSON. I want that if i received a data, two buttons will AUTOMATICALLY be created which is accept and decline and if i receive another data another set of two buttons will be created. I am th

Pass data from a list to a new activity

Can someone help me with following issue: When I click on an item in the listview, I need to open a new activity with the data from the listview... here is my code: public class listar_clientes extends ListActivity { private ProgressDialog pDialog; /

I want to return two results of a function in php

Here is my function in DB_Functions.php, i want to get two different values from two different tables in single function only here is the code what i have tried so far but the values are coming null. public function getUserMetvalue($exname,$fname) {

I have an error while using setOnClickListener

This question already has an answer here: NullPointerException accessing views in onCreate() 12 answers I got the program to crash when using the simple code below as it is closed automatically after installing it package com.zaki.thenewboston; impor

Android Studio does not recognize my device

Here is the problem. I want to run my Android Studio apps on my device (Samsung Galaxy Ace 2). But nothing works for me. Tell me what I've missed: 1) USB debugging is on 2) ADB driver is installed (in device manager i can see Android Composite ADB In

ParseQueryAdapter gets the position of the object

I am trying to figure out how to find the position of a custom ParseObject in a ParseQueryAdapter<> so that I can set the position of a spinner or check rows of a check list in my Android project. I am currently using a custom adapter extending Pars

Sending stored accelerometer values ​​to the server

i want to send the accelerometer values recorded for 5 seconds to server.i tried to concatenate the values and send through http post request but it is not working. since almost 350 values are recorded the data is large and is not possible send throu

Encrypt / decrypt the last 64K of the file

I am trying to encrypt/decypt last 64 KB of a file, but one of the file folder is missing from the encrypted file. Here I am trying to implement on a zip file. Currently here are 3 folders in the zip file and at the resulted zip, it is only showing t

Draw not visible when camera preview is present

I'm writing an app that requires displaying a semi-transparent PNG layer over a camera preview. Everything was fine until I wanted to publish it and make sure it works also on Android 2.x. It seems that on older versions of Android, the camera previe

Android: write text on txt

With the following code, I try to write to my sdcard: public void writedata(String data) { //BufferedWriter out = null; System.out.println(data); try{ FileOutputStream out = new FileOutputStream(new File("/sdcard/tsxt.txt")); out.write(data.getB

LibGDX and ObjLoader do not display .mtl?

I am trying to load .obj files into an Android project with LibGDX. The files have no texture file, but include materials in .mtl files. I'm using the latest official nightly, and rendering the object file only results in the object appearing white.

Android: Parse Custom Forum Tags

I want to parse some strings which contains custom forum tags in them,like: [url=]----sent from my Sony Ericsson LT28h,Android 4.2.1[/url] and show this tag string in a textview to be a clickable link

New Facebook sdk: API access problem

I am using the new facebook sdk in android to get the facebook albums. The code I am using is, Session session = Session.getActiveSession(); Request request = new Request(null, "" + session.getAc

AsyncTask OnPostExecute Does Not Update TextView

I have an AsyncTask running. I have a TextView that I mimic the message a Toast initially produces. I want to clear the TextView upon success in OnPostExecute but it not doing so. The task complete Toast works fine. How do I set the TextView in the O

Where to read about the attribute format id?

What does this mean @[+][package:]type:name or this @+id/my_id ? What plus does? No detailed explanation in apidoc @[+][package:]type:name You can use the id of an element from other packa

Android: make a service non-stoppable

I wonder if there is a way in Android to prevent a service from being stopped from the "running services" screen. I've developed a service that is started from my app and I basically want to stop it only from my app; currently I can stop it by s

jquery-mobile loaded in an Android WebView

I've not been able to get a webpage decorated by jquerymobile to load into an Android WebView. Consider the jquery mobile demo site: final WebView browser; browser = (WebView) findViewById(;

Reactivity of the Android Dump sensor

I have an application in Android that dumps the sensor values to the SDcard memory of the phone and kills itself when I press a button on the screen. I am using Sensor_delay_fastest to get maximum update of the sensors. My problem is that since I'm d

The Android app will not start Service

Hey, I'm trying to implement a service on my Android Application. And the Service must do the same task of the Activity. IE, if some change happen on the CallLog.Calls content provider the service must be notified and insert the data in the database

Custom ListView Adapter [Android]

I've been stuck on a little bug trying to implement a custom listview in Java for an Android application. I'm trying to list a bunch words (typically, 100 < n < 500) and highlight a subset of those rows by changing the text color. The both sets of w