I tried to implement an AdMob in the cocos2dx project via android studio and got the following message after the build succeeded. The app doesn't run. I've set the gradle, manifest file, AppActivity in android studio folder. Starting: Intent { cmp=co
I created a list view, now I want to make it just like when I swipe them left or right it behave like call and message button respectively. . Just like this Image. A list view carrying some data. While we swipe it left or right it respond. Here I nee
I'm a beginner with Admob, I only have one banner in a simple android app that only have one activity. I'm doing a new app that will have a lot of activities and my question is: I have to put only one banner for the whole app or a different banner pe
What are the pros and cons in using vector drawables vs. using a set of .png for Android system icons? If they're meant for two different things, what are those?A png is a compressed image. It has a fixed size, if you try to make it bigger or smaller
i just followed exapmple : https://www.learn2crack.com/2016/02/recyclerview-json-parsing.html its working great ..i want to parse [ { "song_name": "Hero", "song_id": "1990", "artist_name": "Enrique&qu
This question already has an answer here: When should I use "this" in a class? 16 answers I am new to java and android and want to understand how this works? public class MainActivity extends AppCompatActivity { private class MyThread implements
I have a class postedJobHistory (Fragment): public class PostedJobHistory extends Fragment { String employerName; private List<ParseObject> jobDetails; Context context; public PostedJobHistory() {} public PostedJobHistory(Context context, String emp
Can we create a centralized event handler for multiple buttons in Android? If so, how can we do that?Yonatan Nir's solution is the easiest but if you're already using Butterknife you can do it like this: @OnClick({ R.id.button1, R.id.button2, R.id.bu
I currently have an Unit Converter app that I'm working in. Here I've used multiple Blank Activities. Where each Unit's Activity can be opened using MainActivity. But now I want to make it tablet friendly. Hence I want to use FragmentActivity now. Is
I am new in android so I am trying to show the images size more than 50 Xhdpi in gridview but while doing this when I execute my program it makes screen hold for sometime and then execute. Can any one tell the reason why it is taking time. Here is my
I want to get an array based on another array click position like : String[] nissanArray = getResources().getStringArray(R.array.nissan); String name = nissanArray[pos]; int nameInt = Integer.parseInt("R.array." + name); targetArray = getResourc
For testing purposes I copied the full example found on the phonegap camera API and I put an alert on onPhotoDataSuccess to test when the function is fired. On the first photo taken the alert will not show. However after the first attempt the alert w
I made an app that uses a surfaceView to display camera preview.I got many reports in developer console with errors in surfaceChanged part: @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { Parameters par
My text file contain: 1.232 3.456 2.341 23.41 .... I want to use these coordinates to draw line that continue from previous coordinate in Android eclipse. So far my code below can read the first line(line1a & line1b) to be written into canvas.drawLin
I am using camera API to build a custom camera. I used emulator to test my application,but it shows me only a white screen on camera.open(). Is there a chance that it is my code's fault or the emulator's?You are getting black screen because you are n
OK, I'm having the weirdest bug right now : the Android application I'm working on is displaying a grey background instead of the map, such as below : WTF http://img4.hostingpics.net/pics/572343Screenshot20130425161918.jpg Here's the logcat : 04-25 1
This following setup does not work, does anybody know why (I cant seem to find examples of custom surface view in a fragment). My surfaceView class is just hollow at the moment: class MySurfaceView extends SurfaceView implements Runnable{ public MySu
I don't accomplish to dismiss progress bar in my Android App. I declare an object bar object and get a String calling the doInProgress function and pass to it an object called v1. When the async task finishes his task, why progress bar (wichs appears
Currently in my project, I am making Http requests and I want different http response to be sent to different callback methods. I wrote a quick sample below to show what I want to do. I know it probably wont be possible the way i want it, but are the
When I click for creating android new project this window open .I have been restart even though I can't do this. error image is as. and when click for check update from help menu then this error occure and pop up is that no update found what is probl
I have just switch to android development and came across this doubt. How is AVD different from emulator?AVD : Android Virtual Device Quoting from the Android Developer Site : Managing Virtual Devices An Android Virtual Device (AVD) is an emulator co
I'm currently trying to write an app for one special device running Android 2.3.4, that places a system overlay on a precisely defined spot on the screen. This is why I am positioning the layer using absolute values. I wrote an activity (including tw
I have 30 threads (AsyncTask) executed in the same time. Before execute them, I will show progressdialog. After threads finish execution, I will dismiss progressdialog. Any suggestion on How to dismiss ProgressDialog after finish all threads?If you a
I have an activity where the view is like a form, where user can enter the details and At the bottom there are two buttons "save" and "cancel". The form has many number of edit boxes. So I have taken a relative layout and put all these
I am using Robolectric without using maven to build, meaning I am using the Robolectric-with-dependencies Jar. I set it up based on instructions on Robolectric's site, yet I am still getting the WARNING: Unable to find path to Android SDK" error. I f
I've generated a testing barcode image, http://generator.onbarcode.com/linear.aspx?TYPE=7&DATA=ID%3ao0123456789&UOM=0&X=1&Y=60&LEFT-MARGIN=0&RIGHT-MARGIN=0&TOP-MARGIN=0&BOTTOM-MARGIN=0&RESOLUTION=0&ROTATE=0&BARC
I am hitting a brickwall with serialization of a subclass of Location in android/java Location is not serializable. I have a first subclass called FALocation that does not have any instance variables. I have declared it serializable. Then I have a se
I am developing an application on android 3.1 Honeycomb. It force-closes on Asus epad. I don't have an Asus Epad to check why it force-closes, so I want to try it on an Asus epad Emulator. I updated the ADK for eclipse but it doesn't provide an Asus
I had an activity (say homeActivity) and when I start a new activity(say nextActivity) from my homeactivity i would like to give it an animation effect like appearing it from the bottom. Is it possible in android?after call to startActivity, make cal
This question already has an answer here: Android ListView Refresh Single Row 6 answers Is it possible to redraw a single row in a ListView? I have a ListView with rows that are LinearLayouts. I listen to a preference change and sometimes I need to c