id
int64
28.5M
73.8M
title
stringlengths
15
150
question_body
stringlengths
69
39.4k
body_text
stringlengths
6
29.2k
tags
stringlengths
7
120
score
int64
-19
384
creation_date
stringlengths
20
24
year
int64
-1
2.02k
month
int64
-1
12
hour
int64
-1
23
dayofweek
int64
-1
6
view_count
int64
3
367k
answer_count
int64
0
34
body_len
int64
6
29.2k
title_len
int64
15
150
tag_count
int64
1
6
code_block_cnt
int64
0
17
has_code
bool
2 classes
is_unanswered
bool
2 classes
is_popular
bool
2 classes
is_viral
bool
2 classes
is_highly_voted
bool
2 classes
is_negative
bool
2 classes
score_bucket
stringclasses
5 values
28,783,220
Android Superclass to Subclass casting
<p>I'm using Android Studio to develop for Android. I tried this</p> <pre><code>MarginLayoutParams mlp; LayoutParams lpms = new LayoutParams(5, 5); mlp = (MarginLayoutParams) lpms; //Throws Class cast exception </code></pre> <p>But it causes ClassCastException. Why? MarginLayoutParams is a subclass of LayoutParams. I...
I'm using Android Studio to develop for Android. I tried this [CODE] But it causes ClassCastException. Why? MarginLayoutParams is a subclass of LayoutParams. I also tried to use instanceof, but it returns false. How can I do casting? Update: I found this code in Cyanogenmod Calculator app on GitHub: [CODE]
java|android|android-studio|downcast
0
2015-02-28T15:13:58.717Z
2,015
2
15
5
301
1
307
38
4
2
true
false
false
false
false
false
zero
28,783,301
i am creating a simple google map application; i am facing errors given below
<p>xml file</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;fragment xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mvMain" android:layout_width="match_parent" android:layout_height="match_parent" android:name="com.google.android.gms....
xml file [CODE] Menifest file [CODE] logcat: 02-28 19:56:58.052: E/AndroidRuntime(2857): FATAL EXCEPTION: main 02-28 19:56:58.052: E/AndroidRuntime(2857): Process: com.prashant.maps, PID: 2857 02-28 19:56:58.052: E/AndroidRuntime(2857): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.prashant.map...
android|eclipse
-1
2015-02-28T15:21:48.413Z
2,015
2
15
5
126
1
5,347
77
2
2
true
false
false
false
false
true
negative
28,783,350
android.support.v4.app.Fragment disadvantages
<p>Before changing my entire app to v4 fragments, can someone tell me if there're important disadvantages I should take under consideration? What are the differences between the original fragment and the v4 one?</p>
Before changing my entire app to v4 fragments, can someone tell me if there're important disadvantages I should take under consideration? What are the differences between the original fragment and the v4 one?
android|fragment|android-support-library
0
2015-02-28T15:26:50.180Z
2,015
2
15
5
639
2
208
45
3
0
false
false
false
false
false
false
zero
28,783,412
Listening to YouTube links using intent filter
<p>I am trying to make my app listen for YouTube links much like how how YouTube app does. I have an activity with the following intent filter: </p> <pre><code>&lt;activity android:name=".YoutubeLinkActivity" android:label="@string/app_name"&gt; &lt;intent-filter&gt; &lt;action android:nam...
I am trying to make my app listen for YouTube links much like how how YouTube app does. I have an activity with the following intent filter: [CODE] However, the app that opens up is the default YouTube app rather than mine. I tried the same intent filter for other host , too. In that case, the browser just goes to the ...
android|android-intent|youtube|intentfilter
0
2015-02-28T15:32:20.230Z
2,015
2
15
5
734
1
386
46
4
1
true
false
false
false
false
false
zero
28,783,442
how to test Facebook Login for my mobile app
<p>I am adding Facebook login to my app so to get permission to post photos for users. Having created the code, I now want to test that it works. So naturally I am using my own Facebook again to see that the system works. The first time I went through, I found some stuff I didn't like. So I made the changes. Now that I...
I am adding Facebook login to my app so to get permission to post photos for users. Having created the code, I now want to test that it works. So naturally I am using my own Facebook again to see that the system works. The first time I went through, I found some stuff I didn't like. So I made the changes. Now that I wa...
android|ios|facebook|facebook-graph-api
0
2015-02-28T15:34:16.607Z
2,015
2
15
5
683
1
819
44
4
0
false
false
false
false
false
false
zero
28,783,444
How to add a view that disappears when scroll up (go down in listview) and appears when scroll down?
<p>I want to add a button to the bottom of the layout. When I scroll up, go down in the listview, I want the button to disappear and vice versa. Just like in the twitter app. There is a textView for quick tweet at the bottom of the home page and when scroll up the view becomes invisible. What is the most simple code do...
I want to add a button to the bottom of the layout. When I scroll up, go down in the listview, I want the button to disappear and vice versa. Just like in the twitter app. There is a textView for quick tweet at the bottom of the home page and when scroll up the view becomes invisible. What is the most simple code doing...
android|android-layout|android-listview
1
2015-02-28T15:34:31.130Z
2,015
2
15
5
1,581
2
326
100
3
0
false
false
false
false
false
false
low
28,783,446
Calling an AlertDialog in another class from a button onClick in another Activity
<p>I want to call my AlertDialog "DeleteConfirm" in my Alerts.class from my AccountManager.class through a button onClick event. How do I go about this without affecting the AlertDialog's ability to delete an entry from my database. </p> <p>EDIT: I have tried calling <code>Alerts.DeleteConfirm(con, acc);</code> before...
I want to call my AlertDialog "DeleteConfirm" in my Alerts.class from my AccountManager.class through a button onClick event. How do I go about this without affecting the AlertDialog's ability to delete an entry from my database. EDIT: I have tried calling Alerts.DeleteConfirm(con, acc); before and ended up with a "Can...
android|sqlite|android-alertdialog|buttonclick
0
2015-02-28T15:34:54.163Z
2,015
2
15
5
2,620
2
647
81
4
2
true
false
true
false
false
false
zero
28,783,485
Android: Same listView on different Activities
<p>I want to have the same listview (with same fields) in 2 different activities. In one Activity, per each item, I want to show 2 buttons and in the another activity I don't want to show those buttons. </p> <p>Does anyone knows how can I modify my Adapter code to obtain it? (To construct my listview I'm using an adap...
I want to have the same listview (with same fields) in 2 different activities. In one Activity, per each item, I want to show 2 buttons and in the another activity I don't want to show those buttons. Does anyone knows how can I modify my Adapter code to obtain it? (To construct my listview I'm using an adapter). [CODE]
android
0
2015-02-28T15:38:53.723Z
2,015
2
15
5
79
0
320
46
1
1
true
true
false
false
false
false
zero
28,783,486
Scroll ActionBar up and hide with scroll in RecyclerView
<p>I want to achieve the scrolling technique used in Google Play Store app. The app portrays tabs below action bar. Once the content is scrolled up, it pushes the action bar up and finally hides it. At that point the tabs remain sticky at the top.</p> <p>I tried the following code, but the flickering is there - </p> ...
I want to achieve the scrolling technique used in Google Play Store app. The app portrays tabs below action bar. Once the content is scrolled up, it pushes the action bar up and finally hides it. At that point the tabs remain sticky at the top. I tried the following code, but the flickering is there - [CODE] Also, I'm ...
android|android-actionbar|material-design|android-recyclerview
0
2015-02-28T15:39:09.713Z
2,015
2
15
5
712
1
461
56
4
1
true
false
false
false
false
false
zero
28,783,606
how to write generic class for managing resources(strings.xml) in Android
<p>I'm have troubling about a design situation in my Hangman game in Android.</p> <pre><code>public class ModeSelectionActivity extends Activity{ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_modeselection); ...
I'm have troubling about a design situation in my Hangman game in Android. [CODE] In this activity, I'm designing a page that a user picks a game mode such like football words, city/country words etc.. This category names are coming from strings.xml file [CODE] And these array is passed into customgridviewadapter, and ...
android|resources
0
2015-02-28T15:48:54.397Z
2,015
2
15
5
64
1
811
73
2
2
true
false
false
false
false
false
zero
28,783,628
implement HorizontalScrollView inside ListView
<p>I implement successful HorizontalScrollView using this sample <a href="https://github.com/krishnalalstha/Android-HorizontalScrollView" rel="nofollow">code</a> and <a href="http://www.wingnity.com/blog/android-json-parsing-and-image-loading-tutorial/" rel="nofollow">this</a> . which will fetch the data from a server<...
I implement successful HorizontalScrollView using this sample code and this . which will fetch the data from a server but now I'm trying to make a horizontal scroll view inside a ListView , i not find the right way!!! So that each element of list Will contain this : [CODE] MainActivity [CODE] listview.xml [CODE] code o...
android|listview|horizontalscrollview
2
2015-02-28T15:50:54.613Z
2,015
2
15
5
1,088
0
363
46
3
4
true
true
false
false
false
false
low
28,783,671
Retrieve multiple images from parse with getdatainbackground (android)
<p>I'm a newbie with android and really need some help from who's familiar with Parse API. What I have done was setting up my card container filled with multiple images. However, the real display shows cards in random sequence according to "DownloadBitmap" instead of ascending order as my thought. The suspicious root c...
I'm a newbie with android and really need some help from who's familiar with Parse API. What I have done was setting up my card container filled with multiple images. However, the real display shows cards in random sequence according to "DownloadBitmap" instead of ascending order as my thought. The suspicious root caus...
android|parse-platform
0
2015-02-28T15:54:57.327Z
2,015
2
15
5
439
1
581
70
2
1
true
false
false
false
false
false
zero
28,783,674
linechart achartengine showcustomtextgridYon right side while all other labels on left
<p><img src="https://i.stack.imgur.com/C2xqg.jpg" alt="images of line chart with custom textfields added on right side">Is there a way where i can add all labels of line chart (using achartengine) on left side but keep the custom text grids added on y axes to right side ? Because when i setCustomTextGridY it sets the c...
Is there a way where i can add all labels of line chart (using achartengine) on left side but keep the custom text grids added on y axes to right side ? Because when i setCustomTextGridY it sets the custom texts to left side where the labels are present.
android|achartengine
0
2015-02-28T15:55:02.813Z
2,015
2
15
5
31
0
254
86
2
0
false
true
false
false
false
false
zero
28,783,677
External libraries vs libs folder
<p>Hey I'm pretty new to android studio, and relatively new to android development and it recently occurred to me that I'm not sure whether to put libraries in the libs folder or set them up as as an external library - what's the difference?</p> <p>Most of what I've found online explains how to include jar files in th...
Hey I'm pretty new to android studio, and relatively new to android development and it recently occurred to me that I'm not sure whether to put libraries in the libs folder or set them up as as an external library - what's the difference? Most of what I've found online explains how to include jar files in the libs fold...
android|android-studio
1
2015-02-28T15:55:27.197Z
2,015
2
15
5
705
1
572
33
2
0
false
false
false
false
false
false
low
28,783,690
Android ViewPager center item on screen
<p>I am trying to show a dialog over my screen. And that dialog should have ViewPager in it with FragmentPagerAdapter. Each item in adapter has width set to .7f. What is important to me is that when some item is selected it should be snapped to center of the ViewPager with parts of next and previous fragments visible (...
I am trying to show a dialog over my screen. And that dialog should have ViewPager in it with FragmentPagerAdapter. Each item in adapter has width set to .7f. What is important to me is that when some item is selected it should be snapped to center of the ViewPager with parts of next and previous fragments visible (exa...
android|dialog|android-viewpager|fragment|center
4
2015-02-28T15:56:48.927Z
2,015
2
15
5
7,446
2
625
39
5
0
false
false
true
false
false
false
low
28,783,712
Fragments contents overlap each other
<p>I have used the documentation provided by google. All is well but the contents of fragments overlap each other when switched by tabs. </p> <p>Here is the code.</p> <p>Main Activity</p> <pre><code>public class login_register extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstance...
I have used the documentation provided by google. All is well but the contents of fragments overlap each other when switched by tabs. Here is the code. Main Activity [CODE] Here is the one of the fragments. [CODE] I do not know what I am doing wrong. Any help please. Edit Here is the picture
android|android-fragments
0
2015-02-28T15:59:01.267Z
2,015
2
15
5
245
3
292
37
2
2
true
false
false
false
false
false
zero
28,783,720
using Loader with a Fragment/Activity with UI widgets triggering updates to the loaders content
<p>I'm using for a while the <a href="http://developer.android.com/guide/components/loaders.html" rel="nofollow">Loaders</a> API's. I found it great solution and most elegant design to solve the generic problem of most apps: displaying "processed" dynamic content with minimum interference to the <code>Fragment</code>/<...
I'm using for a while the Loaders API's. I found it great solution and most elegant design to solve the generic problem of most apps: displaying "processed" dynamic content with minimum interference to the Fragment / Activity - the responsibility of loading the data and all the logic behind that is encapsulated within ...
android|android-activity|android-sqlite|android-loadermanager|android-loader
0
2015-02-28T15:59:32.470Z
2,015
2
15
5
677
1
3,021
95
5
0
false
false
false
false
false
false
zero
28,783,757
adding animation to cluster marker?
<p>simple question ... how to add animation to the marker of the cluster before the cluster draw it on the map !? I kept looking but no hope. I just need to know where to start</p> <p>this is how I add my cluster and how I tried to do the animation </p> <pre><code>private class AddMarker implements Runnable { private...
simple question ... how to add animation to the marker of the cluster before the cluster draw it on the map !? I kept looking but no hope. I just need to know where to start this is how I add my cluster and how I tried to do the animation [CODE]
android|google-maps|animation|markerclusterer
3
2015-02-28T16:03:41.063Z
2,015
2
16
5
1,708
2
245
35
4
1
true
false
false
false
false
false
low
28,783,761
Device-Owner fine grain control of configuration: How?
<p>I'm designing a device-owner App for professional purposes, and even if there is few doc about this, Google tells everywhere* that a device-owner app can do almost whatever it wants on the device... But sadly all the examples are desperately referring to setup and verify passwords strenght...</p> <p>What I want to ...
I'm designing a device-owner App for professional purposes, and even if there is few doc about this, Google tells everywhere* that a device-owner app can do almost whatever it wants on the device... But sadly all the examples are desperately referring to setup and verify passwords strenght... What I want to do are thin...
android|android-5.0-lollipop|device-policy-manager|device-owner
0
2015-02-28T16:04:03.617Z
2,015
2
16
5
673
1
1,349
54
4
0
false
false
false
false
false
false
zero
28,783,776
Android app. with its own keyboard?
<p>Is it possible to make an Android app. that defines its own keyboard and switches to it when the app. is running? But reverts to the user's default keyboard when he / she switches back to a different app?</p> <p>I understand the virtues of decoupling apps. from input devices, but when you want quite a close connect...
Is it possible to make an Android app. that defines its own keyboard and switches to it when the app. is running? But reverts to the user's default keyboard when he / she switches back to a different app? I understand the virtues of decoupling apps. from input devices, but when you want quite a close connection (eg. ke...
android|virtual-keyboard
1
2015-02-28T16:05:46.147Z
2,015
2
16
5
94
3
415
35
2
0
false
false
false
false
false
false
low
28,783,879
My app crashes when switch back and forth activitys (Intent)
<p>My Activity 2 goes to Activity 3, and my Activity 3 has a Button which allows it to go back to Activity 2. But once I go backwards to Activity 2 and try to go to Activity 3 again, this is when the app crashes.</p> <p>So Activity 2 -> Activity 3 -> Activity 2 -> Crashes when going back to Activity 3.</p> <p>Here is...
My Activity 2 goes to Activity 3, and my Activity 3 has a Button which allows it to go back to Activity 2. But once I go backwards to Activity 2 and try to go to Activity 3 again, this is when the app crashes. So Activity 2 -> Activity 3 -> Activity 2 -> Crashes when going back to Activity 3. Here is the intent sending...
android|android-intent|nullpointerexception|bundle
0
2015-02-28T16:16:08.480Z
2,015
2
16
5
528
1
519
60
4
3
true
false
false
false
false
false
zero
28,783,886
Change background color of button on click and then open a new activity
<p>I am trying to make a Button change its background color and launch a new activity on click. Below is the code I wrote, but I am getting error message saying to declare 'Button btn1' as 'final Button btn1'. If I do that, the button change its color on click and launch another activity as I wished, but if returning t...
I am trying to make a Button change its background color and launch a new activity on click. Below is the code I wrote, but I am getting error message saying to declare 'Button btn1' as 'final Button btn1'. If I do that, the button change its color on click and launch another activity as I wished, but if returning to M...
java|android|button|background-color|final
0
2015-02-28T16:16:40.653Z
2,015
2
16
5
989
1
453
71
5
1
true
false
false
false
false
false
zero
28,783,890
Parsing JSON Result Android
<p>I am building an Android application that receives some data in JSON format. At the moment the result is very ugly. I want to display this data neatly in multiple TextViews in my application but I am not to sure how to do it. Source code below.</p> <p>Main.java</p> <pre><code>import java.io.IOException; import jav...
I am building an Android application that receives some data in JSON format. At the moment the result is very ugly. I want to display this data neatly in multiple TextViews in my application but I am not to sure how to do it. Source code below. Main.java [CODE]
java|android|json|eclipse|textview
0
2015-02-28T16:17:19.650Z
2,015
2
16
5
120
3
261
27
5
1
true
false
false
false
false
false
zero
28,783,921
Fragment is cleared when navigated in FragmentStatePagerAdapter
<p>I have an activity that contains a FragmentStatePagerAdapter within this FragmentStatePagerAdapter there are three fragments. Or well, they get initiated when the proper getItem() is called.</p> <p>The activity does a data intensive task, and when it is finished sends a broadcast. I have registered a broadcast rece...
I have an activity that contains a FragmentStatePagerAdapter within this FragmentStatePagerAdapter there are three fragments. Or well, they get initiated when the proper getItem() is called. The activity does a data intensive task, and when it is finished sends a broadcast. I have registered a broadcast receiver in eve...
android|android-fragments|broadcastreceiver|fragmentstatepageradapter
0
2015-02-28T16:20:11.463Z
2,015
2
16
5
91
1
1,311
63
4
4
true
false
false
false
false
false
zero
28,783,922
my app unfortunately stopped on create layout
<p>i'm making an app on android studio and my emulator stopped after opening my layout and give this message on logcat:</p> <pre><code> at com.calcupital.calcupital.VancoFull.onCreate(VancoFull.java:20) </code></pre> <p>and head this line :</p> <pre><code>setContentView(R.layout.vanco_full); </code></pre> <p>and sh...
i'm making an app on android studio and my emulator stopped after opening my layout and give this message on logcat: [CODE] and head this line : [CODE] and show me this: [CODE] what weird me is the app works fine on my phone !!! there is an error inside the layout and can't find it because the emulator is stopped befor...
android
0
2015-02-28T16:20:18.907Z
2,015
2
16
5
121
1
367
45
1
3
true
false
false
false
false
false
zero
28,783,923
Use sys/socket.h in Eclipse working on Windows
<p>I want to use Linux socket functions in a development board working in android. I have installed Eclipse on Windows to develop codes. I am going to use Android-NDK tool to use socket.h for android to be recognized. So my computer is not Linux, can i build my code on Windows? </p>
I want to use Linux socket functions in a development board working in android. I have installed Eclipse on Windows to develop codes. I am going to use Android-NDK tool to use socket.h for android to be recognized. So my computer is not Linux, can i build my code on Windows?
android|linux|eclipse|sockets|android-ndk
1
2015-02-28T16:20:21.963Z
2,015
2
16
5
327
0
275
46
5
0
false
true
false
false
false
false
low
28,783,937
Sending push notification to particular user
<p>Hi everyone iam having a problem with my android app development, please help me find the solution i have an sql database,with php scripts working in server side, iam fetching some details(information of some other users) from the server through my app (returned as JSON array) and iam detailing it in two listviews. ...
Hi everyone iam having a problem with my android app development, please help me find the solution i have an sql database,with php scripts working in server side, iam fetching some details(information of some other users) from the server through my app (returned as JSON array) and iam detailing it in two listviews. I w...
android|push-notification|google-cloud-messaging
0
2015-02-28T16:21:34.980Z
2,015
2
16
5
851
1
1,019
44
3
0
false
false
false
false
false
false
zero
28,783,940
Android License Verification strange behaviour
<p>I have a strange behaviour and I do not have any explanation for this. Can someone help me out ?</p> <ul> <li>I implemented LV into my app.</li> <li>I uploaded this app as a payable app into Google Play.</li> <li>I am testing the app now</li> <li>I sent the app by gmail to my testing google account. I like to simul...
I have a strange behaviour and I do not have any explanation for this. Can someone help me out ? I implemented LV into my app. I uploaded this app as a payable app into Google Play. I am testing the app now I sent the app by gmail to my testing google account. I like to simulate to have a cracked version. I installed t...
android|google-play|android-lvl
1
2015-02-28T16:21:49.547Z
2,015
2
16
5
103
1
1,234
46
3
0
false
false
false
false
false
false
low
28,783,942
Floating Action Buttons disappearing on scroll
<p>I've just installed the FutureSimple library for Floating Action Buttons, and I think it's just beautiful. Although it doesn't contain the disappear on scroll logic, I love it. However, I would like to implement a Quick Return pattern and I'm looking for a simple way to do it. Basically, I set up an ObservableListVi...
I've just installed the FutureSimple library for Floating Action Buttons, and I think it's just beautiful. Although it doesn't contain the disappear on scroll logic, I love it. However, I would like to implement a Quick Return pattern and I'm looking for a simple way to do it. Basically, I set up an ObservableListView ...
android|android-listview|floating-action-button
13
2015-02-28T16:21:56.643Z
2,015
2
16
5
4,944
1
842
46
3
1
true
false
true
false
true
false
medium
28,783,970
Getting output rectangle of drawBitmap has drawn a Bitmap using a Matrix
<pre><code>Bitmap b; Matrix mMatrix; mMatrix.reset(); // move the view so that it's center point is located in 0,0 mMatrix.postTranslate(-sizeX, -sizeY); // scale the view mMatrix.postScale(mScaleFactor, mScaleFactor); // re-move the view to it's des...
[CODE] I need to know if there is an built in method to tell the info like corner coordinates of where the Bitmap is printed, etc. Hope it is clear. Thanks.
android
0
2015-02-28T16:24:54.070Z
2,015
2
16
5
172
1
156
72
1
1
true
false
false
false
false
false
zero
28,783,981
Android Connect Physical Device as ADB Device, not Portable Device
<p>I have a <strong>Nexus 7 Tablet</strong> I want to use for debugging an <strong>Android app</strong> I'm developing.<br> I'm doing the development and testing on a remote server using <strong>RDP</strong> and sharing my ports, including the <strong>USB</strong> that the tablet is connected to.<br> Per the instructio...
I have a Nexus 7 Tablet I want to use for debugging an Android app I'm developing. I'm doing the development and testing on a remote server using RDP and sharing my ports, including the USB that the tablet is connected to. Per the instructions in this article, I have USB debugging enabled, and it is operating over the ...
android|windows|android-debug|device-manager
6
2015-02-28T16:25:29.453Z
2,015
2
16
5
755
0
1,314
66
4
0
false
true
false
false
false
false
medium
28,784,019
Jar library vs Android Library. Which is the difference?
<p>I have a doubt : Jar library vs Android Library</p> <p>Which is the difference ?</p> <p>In jar library I can't use Android's methods, but I can only use java's functions; right ? (for example I can't use the android's method for Json) </p> <p><strong>EDIT :</strong> <em>I have read the below answer and I have und...
I have a doubt : Jar library vs Android Library Which is the difference ? In jar library I can't use Android's methods, but I can only use java's functions; right ? (for example I can't use the android's method for Json) EDIT : I have read the below answer and I have understood that I can use Android SDK inside the JAR...
java|android|jar|android-library
1
2015-02-28T16:28:49.800Z
2,015
2
16
5
635
1
570
56
4
0
false
false
false
false
false
false
low
28,784,069
"RuntimeException :Trying to reuse recycled bitmap"
<p>I have a fragment that contains a simple viewpager which uses a fragmentStatePagerAdapter.</p> <p>When the user clicks on an item in a listview, the fragment mentioned above gets created and becomes visible. In the viewpager the fragment has, there's an imageview that contains a bitmap.</p> <p>I get the error "Run...
I have a fragment that contains a simple viewpager which uses a fragmentStatePagerAdapter. When the user clicks on an item in a listview, the fragment mentioned above gets created and becomes visible. In the viewpager the fragment has, there's an imageview that contains a bitmap. I get the error "RuntimeException :Tryi...
android|bitmap|recycle
0
2015-02-28T16:32:54.203Z
2,015
2
16
5
313
1
971
51
3
2
true
false
false
false
false
false
zero
28,784,104
Layout Background partially transparent
<p>I want to set a transparent background. Maybe 20% of gray but i also want to have a small part of the background being completely transparent (a rectangle or a circle in the layout):</p> <p><img src="https://i.stack.imgur.com/FvKmJ.png" alt="enter image description here"></p> <p>Is that possible? later i want the ...
I want to set a transparent background. Maybe 20% of gray but i also want to have a small part of the background being completely transparent (a rectangle or a circle in the layout): Is that possible? later i want the rectangle (or the circle) to be moveable and scaleable.
android
3
2015-02-28T16:36:06.500Z
2,015
2
16
5
1,630
1
273
39
1
0
false
false
false
false
false
false
low
28,784,119
android Expandable listview default indicator image
<p>I am going to hide indicator of groups using this code in my adapter</p> <pre><code>if ( getChildrenCount( groupPosition ) == 0 ) { holder. Indicator.setVisibility( View.INVISIBLE ); } else { holder. Indicator.setVisibility( View.VISIBLE ); holder. Indicator.setImageResou...
I am going to hide indicator of groups using this code in my adapter [CODE] But I want to use defult expandable list item images instead of list_group_expanded and list_group_closed how can I find default icon of indicator?Can some one help me ?thanks
android|listview|expandablelistview
0
2015-02-28T16:37:27.080Z
2,015
2
16
5
1,070
1
251
51
3
1
true
false
false
false
false
false
zero
28,784,121
I am creating an app for google glass and I have the game_menu.xml file why do I keep getting an error for making a menu?
<p>This is my code:</p> <pre><code>public boolean onCreatePanelMenu(int featureId, Menu menu) { if (featureId == WindowUtils.FEATURE_VOICE_COMMANDS) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.xml.game_menu, menu); </code></pre> <p>Its giving me an error for xml.gam...
This is my code: [CODE] Its giving me an error for xml.game_menu I've included a screen shot.
android|xml|android-studio|google-glass
0
2015-02-28T16:37:30.413Z
2,015
2
16
5
31
0
93
121
4
1
true
true
false
false
false
false
zero
28,784,181
Could not locate google-play-services_lib.jar, but is there
<p>All was ok with BaseGameUtils and GooglePlay services lib used with my project a day ago when I decided to update Eclipse to its latest version Luna Service Release 2 (4.4.2) Build id: 20150219-0600</p> <p>then I've started to get problems with the projects. I did clean and rebuild the entire workspace, even restar...
All was ok with BaseGameUtils and GooglePlay services lib used with my project a day ago when I decided to update Eclipse to its latest version Luna Service Release 2 (4.4.2) Build id: 20150219-0600 then I've started to get problems with the projects. I did clean and rebuild the entire workspace, even restart Eclipse, ...
android|eclipse|google-play-services
0
2015-02-28T16:42:00.497Z
2,015
2
16
5
933
1
934
59
3
2
true
false
false
false
false
false
zero
28,784,323
Failing to include libraries by Maven to Android studio
<p>I have a project which I want to change to use Maven to include the libraries for OSMDroid instead of local dependencies. According the <a href="https://github.com/osmdroid/osmdroid/wiki/How-to-add-the-osmdroid-library-via-Gradle" rel="nofollow noreferrer">OSM Droid tutorial</a> I need to include the following depen...
I have a project which I want to change to use Maven to include the libraries for OSMDroid instead of local dependencies. According the OSM Droid tutorial I need to include the following dependencies: [CODE] And from this SO post I need to add a line to be able to use Maven through the gradle: [CODE] That makes my basi...
android|maven|intellij-idea|android-studio|gradle
3
2015-02-28T16:54:56.003Z
2,015
2
16
5
3,345
1
625
55
5
5
true
false
true
false
false
false
low
28,784,380
I want to sync my one folder and sub folder ,with OneDrive
<p>I want to sync my folder and sub folder in it, all files with OneDrive SDK, please give me idea , other stuff i will handle.</p> <p>Thanks in advance.</p>
I want to sync my folder and sub folder in it, all files with OneDrive SDK, please give me idea , other stuff i will handle. Thanks in advance.
android|sync|live-sdk|onedrive
0
2015-02-28T17:00:07.107Z
2,015
2
17
5
261
0
143
58
4
0
false
true
false
false
false
false
zero
28,784,387
How to speed up Android Studio on a Mac
<p>I am trying to develop some native Android apps using Android Studio (latest) on OS X Yosemite. Currently Android Studio is simply unusable: it is too slow. I am not referring to the Android emulator, which was doubling the development time, but to the source code editor itself.</p> <p>The main problem is that <em>v...
I am trying to develop some native Android apps using Android Studio (latest) on OS X Yosemite. Currently Android Studio is simply unusable: it is too slow. I am not referring to the Android emulator, which was doubling the development time, but to the source code editor itself. The main problem is that very often but ...
android|macos
43
2015-02-28T17:00:40.307Z
2,015
2
17
5
30,995
8
1,393
39
2
1
true
false
true
true
true
false
high
28,784,392
Building AOSP on Mac Yosemite and XCode
<p>So it says <a href="https://source.android.com/source/known-issues.html#build-error-on-macos-with-xcode-43" rel="nofollow">here</a> that Building with XCode 4.3 won't work, and 4.2 should be used instead. In Yosemite, XCode 4.3 isn't the newest, but 6 is and you cannot use 4.2 anymore. The problem seems to be, that ...
So it says here that Building with XCode 4.3 won't work, and 4.2 should be used instead. In Yosemite, XCode 4.3 isn't the newest, but 6 is and you cannot use 4.2 anymore. The problem seems to be, that "switched the default compiler from gcc to llvm, and llvm rejects code that used to be accepted by gcc". As I cannot us...
macos|android-source
1
2015-02-28T17:01:03.377Z
2,015
2
17
5
550
1
515
39
2
1
true
false
false
false
false
false
low
28,784,396
Upload file to server using android
<p>I am using the code below to upload files on server. But whenever I run this code my application closes unexpectedly.</p> <p>Code:</p> <pre><code>import java.io.DataOutputStream; import java.io.File; import java.io.FileInputStream; import java.net.HttpURLConnection; import java.net.MalformedURLException; import ja...
I am using the code below to upload files on server. But whenever I run this code my application closes unexpectedly. Code: [CODE] } And code for php is: [CODE] And I am calling this method through: [CODE] I don't know how but it uploaded two image files before closing down. Any help is appreciated. [CODE] And whenveve...
java|android|file-upload
1
2015-02-28T17:01:49.327Z
2,015
2
17
5
1,013
0
428
35
3
5
true
true
false
false
false
false
low
28,784,488
VS 2015 cordova android network simulation
<p>I'm trying to debug my Cordova App with VS2015 on the VS Android simulator.</p> <p>My problem is that the simulator is not aware that he is connected to the internet. Even if I can access to the internet using the web browser, the system is still offline mode.</p> <p>I tried to simulate the network with 4G connect...
I'm trying to debug my Cordova App with VS2015 on the VS Android simulator. My problem is that the simulator is not aware that he is connected to the internet. Even if I can access to the internet using the web browser, the system is still offline mode. I tried to simulate the network with 4G connection or other but th...
android|visual-studio-cordova|visual-studio-2015
0
2015-02-28T17:11:09.470Z
2,015
2
17
5
305
1
501
42
3
0
false
false
false
false
false
false
zero
28,784,491
drawing button in absulote position android
<p>I am trying to do an in door map, with buttons on it. I designed the map and i want to put the buttons on it as shown in this pic:</p> <p><img src="https://i.stack.imgur.com/RiYBH.png" alt="In door map, with buttons in certain positions"></p> <p>so when user click the buttons i will go to another activity.</p> <p...
I am trying to do an in door map, with buttons on it. I designed the map and i want to put the buttons on it as shown in this pic: so when user click the buttons i will go to another activity. My question is How to put the buttons at those absolute positions and let it work for all screen rosulotions? I have no idea wh...
android|android-layout|android-canvas|android-imageview|android-button
0
2015-02-28T17:11:23.963Z
2,015
2
17
5
416
3
386
43
5
0
false
false
false
false
false
false
zero
28,784,525
I can't add search feature to my listview
<p>I have an listview in my application and when I add search to my listview it dosen't work at all. when I add those code to my project, getfilter doesn't resolve.</p> <pre><code>enter code here public class MyActivity extends Activity { InputStream in; BufferedReader reader; String line = "1"; public ListView lis...
I have an listview in my application and when I add search to my listview it dosen't work at all. when I add those code to my project, getfilter doesn't resolve. [CODE] } my broblem is this code. [CODE] why getFilter() doesn't resolve? Is it releted to my adaptor? please help
java|android|listview
0
2015-02-28T17:14:28.913Z
2,015
2
17
5
82
2
276
41
3
2
true
false
false
false
false
false
zero
28,784,535
Change DES master key to AES in Mifare Desfire
<p>I want to change DES master key to AES key on Mifare DESFire Ev1 cards. I am using Delphi (XE7) and I wrote our communication protocol in native commands. I have too completely datasheet (under NDA NXP). Could you write some steps or function, that I have to use? I have already function for change key (only DES). I ...
I want to change DES master key to AES key on Mifare DESFire Ev1 cards. I am using Delphi (XE7) and I wrote our communication protocol in native commands. I have too completely datasheet (under NDA NXP). Could you write some steps or function, that I have to use? I have already function for change key (only DES). I kno...
android|encryption|nfc|delphi-xe7|mifare
-1
2015-02-28T17:15:03.610Z
2,015
2
17
5
1,033
1
403
46
5
0
false
false
false
false
false
true
negative
28,784,582
Sync project with private directory of bitbucket.org using Android Studio
<p>I want to sync my project with <a href="https://bitbucket.org/" rel="nofollow">https://bitbucket.org/</a> private directory using Android Studio, anyone please tell me step by step, any plugin etc?</p>
I want to sync my project with https://bitbucket.org/ private directory using Android Studio, anyone please tell me step by step, any plugin etc?
android|android-studio|bitbucket
0
2015-02-28T17:18:29.437Z
2,015
2
17
5
553
1
145
73
3
0
false
false
false
false
false
false
zero
28,784,593
Android Studio drawable folders
<p>In Android Studio, I can't figure out where to put images to be used inside the app. The drawable folder isn't broken down into drawable-hdpi, drawable-ldpi, etc. I saw another question asking this and the answer was to switch to Project view instead of Android view but drawable is only one folder there too. There i...
In Android Studio, I can't figure out where to put images to be used inside the app. The drawable folder isn't broken down into drawable-hdpi, drawable-ldpi, etc. I saw another question asking this and the answer was to switch to Project view instead of Android view but drawable is only one folder there too. There is m...
android|android-studio|android-drawable
73
2015-02-28T17:19:56.660Z
2,015
2
17
5
114,650
9
412
31
3
0
false
false
true
true
true
false
high
28,784,621
android - Accessing SharedPreferences on all activities
<p>I'm making an application wherein a student can enter a registration once and he can access the rest of the features of the app.</p> <p>My question is, how can I save the registration number he's going to enter, save it in a variable and use it in other activities in the app?</p> <p>I've got this code for the logi...
I'm making an application wherein a student can enter a registration once and he can access the rest of the features of the app. My question is, how can I save the registration number he's going to enter, save it in a variable and use it in other activities in the app? I've got this code for the login activity: [CODE] ...
java|android
0
2015-02-28T17:21:45.870Z
2,015
2
17
5
68
2
520
55
2
1
true
false
false
false
false
false
zero
28,784,623
ImageView in Fragment of ViewPager(animation / rotate)
<p>I have ViewPager with some Fragments. In one of them I have ImageView. I want to rotate that ImageView gradually when user scroll the pages from one to another! Here below you can see example. I want to have same effect as in the second page here.</p> <p>I tried to use these code, but it rotate instantly not gradua...
I have ViewPager with some Fragments. In one of them I have ImageView. I want to rotate that ImageView gradually when user scroll the pages from one to another! Here below you can see example. I want to have same effect as in the second page here. I tried to use these code, but it rotate instantly not gradually. [CODE]...
android|android-activity|android-fragments|android-viewpager|android-animation
2
2015-02-28T17:21:53.583Z
2,015
2
17
5
1,242
1
341
54
5
1
true
false
false
false
false
false
low
28,784,690
Force RecyclerView to bottom of page in layout
<p>I have a page that consists of an <code>ImageView</code>, and a <code>RecyclerView</code>. The <code>RecyclerView</code> contains a small number of items (currently three) and only takes up around a quarter of the screen on my test device. However, despite trying numerous layout options, I cannot get the <code>Recyc...
I have a page that consists of an ImageView , and a RecyclerView . The RecyclerView contains a small number of items (currently three) and only takes up around a quarter of the screen on my test device. However, despite trying numerous layout options, I cannot get the RecyclerView to effectively wrap its content and ta...
java|android|xml|android-layout
3
2015-02-28T17:26:40.790Z
2,015
2
17
5
4,893
3
1,443
46
4
0
false
false
true
false
false
false
low
28,784,711
Picasso's .fit() is off by some pixels
<p>I have an <code>ImageView</code> with fixed <code>layout_height</code> and <code>layout_width</code> and a frame which is in it's background (code below).</p> <p>I want to load an image into it using picasso and make the image fit the <code>ImageView</code> bounds.</p> <p>My <code>ImageView</code>:</p> <pre><code...
I have an ImageView with fixed layout_height and layout_width and a frame which is in it's background (code below). I want to load an image into it using picasso and make the image fit the ImageView bounds. My ImageView : [CODE] background_photo_frame : [CODE] Picasso loading code: [CODE] Picasso version: [CODE] With t...
android|imageview|scale|picasso
0
2015-02-28T17:29:07.267Z
2,015
2
17
5
222
1
659
38
4
4
true
false
false
false
false
false
zero
28,784,745
Android - ImageView.getDrawingCache() is returning null
<p>I need to get a Bitmap from ImageView, but when I call imageView.getDrawingCache(), I get a NullPointerException. My code is as follows:</p> <pre><code>private void getBitmapFromImageView(Bitmap bitmap) { ImageView imageView = new ImageView(this); imageView.setImageBitmap(bitmap); imageView.setRotatio...
I need to get a Bitmap from ImageView, but when I call imageView.getDrawingCache(), I get a NullPointerException. My code is as follows: [CODE]
android
1
2015-02-28T17:32:40.727Z
2,015
2
17
5
812
1
143
55
1
1
true
false
false
false
false
false
low
28,784,749
Android - Difference between Broadcast Receiver and Service
<p>I am wondering, what would be the difference between registering broadcast receiver statically in the manifest and starting a service? Both will run even if the app is in the background and it seems to me that receiver is much less complicated to code. Am I missing something here?</p>
I am wondering, what would be the difference between registering broadcast receiver statically in the manifest and starting a service? Both will run even if the app is in the background and it seems to me that receiver is much less complicated to code. Am I missing something here?
android|android-intent|broadcastreceiver|android-service|android-broadcast
1
2015-02-28T17:33:10.170Z
2,015
2
17
5
1,640
1
281
59
5
0
false
false
false
false
false
false
low
28,784,805
Need help converting a process from Java(android) to IOS Swift
<p>Background: I have a process in an android application that resizes an image, uses JPEG compression of 30% from a bitmap, and returns a byteArray in which I convert to base64Encoded String. I need this type of functionality ported to IOS Swift if possible. I am undergoing information overload from the amount of meth...
Background: I have a process in an android application that resizes an image, uses JPEG compression of 30% from a bitmap, and returns a byteArray in which I convert to base64Encoded String. I need this type of functionality ported to IOS Swift if possible. I am undergoing information overload from the amount of methods...
android|ios|swift|uiimage
1
2015-02-28T17:39:09.280Z
2,015
2
17
5
674
1
599
62
4
2
true
false
false
false
false
false
low
28,784,813
How to select primary Sim in Dual sim supported cell to send an sms?
<p>How to select primary Sim in Dual sim supported cell to send an sms?</p> <p>I have written a code which send an sms through 1st Sim even anyone of both are selected.</p> <p>And even sms received from second sim</p> <pre><code> private void sendSMS(String phoneNumber, String message) { String SENT = "SMS_SE...
How to select primary Sim in Dual sim supported cell to send an sms? I have written a code which send an sms through 1st Sim even anyone of both are selected. And even sms received from second sim [CODE] I want send to sms on selected sim. But I could not found the solution.
android|sms|sendmessage|dual-sim
1
2015-02-28T17:39:46.693Z
2,015
2
17
5
1,414
1
275
68
4
1
true
false
false
false
false
false
low
28,784,829
Text cannot be written in multiple lines in EditText
<p><code>EditText</code> has strange behavior. Whatever I write in it is written in only <strong>single line</strong>. I am not able write text in a second line (new line).</p> <p>Why I cannot write text in multiple lines?</p> <p>Here's my <code>EditText</code></p> <pre><code>&lt;EditText android:id="@+id/tbr_de...
EditText has strange behavior. Whatever I write in it is written in only single line . I am not able write text in a second line (new line). Why I cannot write text in multiple lines? Here's my EditText [CODE] Whereas my another activity has same EditText with all same attributes, and it lets me write in multiple lines...
android|layout|android-edittext
1
2015-02-28T17:41:42.543Z
2,015
2
17
5
987
3
450
52
3
2
true
false
false
false
false
false
low
28,784,846
set intent's display size and position it if it is possible
<p>I'm new to android so I appreciate all the comments you have.</p> <p>I want to call a new Intent from a BroadcastReceiver. Is it possible to set the displayed size of the new intent and position it?</p> <p>Precisely, I would like to place a custom picture on top of the incoming call screen and still be able to ans...
I'm new to android so I appreciate all the comments you have. I want to call a new Intent from a BroadcastReceiver. Is it possible to set the displayed size of the new intent and position it? Precisely, I would like to place a custom picture on top of the incoming call screen and still be able to answer or reject the c...
android|image|android-intent|size|call
0
2015-02-28T17:43:27.860Z
2,015
2
17
5
221
1
434
59
5
0
false
false
false
false
false
false
zero
28,784,864
Continuous Touch in Andengine
<p>From my search, I found methods like <code>onUpdate-</code> and <code>onUpdateManager</code> but I must be doing it wrong because I can't find. I'm using <code>.runOnUpdateThread(Runabale);</code> but it doesn't work </p> <p>If it helps, this is part of my code:</p> <pre><code>public class GameActivity extends Sim...
From my search, I found methods like onUpdate- and onUpdateManager but I must be doing it wrong because I can't find. I'm using .runOnUpdateThread(Runabale); but it doesn't work If it helps, this is part of my code: [CODE] protected Scene onCreateScene() { Scene s = new Scene(); [CODE] EDIT [CODE]
android|andengine
0
2015-02-28T17:45:36.497Z
2,015
2
17
5
94
2
298
29
2
3
true
false
false
false
false
false
zero
28,784,874
Android - populate a matrix type view (not scrollable) with single 32x32 bitmap image
<p>I'm trying to develop a pathfinding app that implements A*. </p> <p>To begin with, I need to display the navigation cells.<br> I need to use a single 32 pixel square bitmap that represents the navigation cells in columns and rows (before I load the blocker cells, start point, and end point).</p> <p>They need to fi...
I'm trying to develop a pathfinding app that implements A*. To begin with, I need to display the navigation cells. I need to use a single 32 pixel square bitmap that represents the navigation cells in columns and rows (before I load the blocker cells, start point, and end point). They need to fill the screen in a matri...
android|bitmap|android-gridview|android-gridlayout
1
2015-02-28T17:46:23.687Z
2,015
2
17
5
47
1
572
85
4
0
false
false
false
false
false
false
low
28,784,876
How do I change the text size and color within tabs when using SlidingTabLayout in Android?
<p>So the effect will be each individual tab will be a little larger in addition to the text color change. I've tried using the setCustomTabView() but it only applies to the first tab and the rest of my tabs are unrendered.</p>
So the effect will be each individual tab will be a little larger in addition to the text color change. I've tried using the setCustomTabView() but it only applies to the first tab and the rest of my tabs are unrendered.
android
3
2015-02-28T17:46:24.063Z
2,015
2
17
5
349
1
220
91
1
0
false
false
false
false
false
false
low
28,784,909
How to get device account merged with contacts list
<p>My app presents the device contact list for the user to select a contact. However, I do not see the device login - the name &amp; email used to sign in to the android store - in the contact list.</p> <p>I've read other posts showing how I can get the device login from the system profile. However, I'm trying to un...
My app presents the device contact list for the user to select a contact. However, I do not see the device login - the name & email used to sign in to the android store - in the contact list. I've read other posts showing how I can get the device login from the system profile. However, I'm trying to understand what pre...
android|contacts|account
0
2015-02-28T17:50:13.327Z
2,015
2
17
5
98
1
641
51
3
0
false
false
false
false
false
false
zero
28,784,955
Why result size of getFromLocation() is 0 ? How to get address from geopoint ? - Android
<p>I want to return a string array from Async class back to the activity that is calling this asynchronous class that is job is to do the reverse geocoding. </p> <hr> <p>So, from my activity I call the constructor of the class like this:</p> <pre><code>Double[] lat_long = new Double[] { Double.parseDouble(map_lat), ...
I want to return a string array from Async class back to the activity that is calling this asynchronous class that is job is to do the reverse geocoding. So, from my activity I call the constructor of the class like this: [CODE] And this is the code of the class: [CODE] This is the logcat: [CODE] I get correctly the la...
java|android|google-maps|android-asynctask|reverse-geocoding
0
2015-02-28T17:56:56.240Z
2,015
2
17
5
902
1
420
88
5
3
true
false
false
false
false
false
zero
28,785,026
How to insert an image with the ListView?
<p>I need to modify my code to make it show the text with image not to change the whole code to another one with image function:</p> <p>This is my code for images:</p> <pre><code> int[] imgs = new int[] { R.drawable.wifi, R.drawable.bluetooth, R.drawable.usb, R.drawable.cloud, ...
I need to modify my code to make it show the text with image not to change the whole code to another one with image function: This is my code for images: [CODE] And this is my ListView code: [CODE] And this is my custom_listview : [CODE] How to modify it to show the text with the image?
android|listview
0
2015-02-28T18:03:16.407Z
2,015
2
18
5
65
2
287
41
2
3
true
false
false
false
false
false
zero
28,785,061
Query for multiple rows in SQLitefor Android
<p>This is just an simplified version of a DB I am using:</p> <p><img src="https://i.stack.imgur.com/Xsi75.png" alt="Sample DB"></p> <p>Lets say if I wanted to query to get IDs 101, 102, 114, 212, and 256.</p> <pre><code>cursorLoader = new MyCursorLoader(getActivity()) { @Override pu...
This is just an simplified version of a DB I am using: Lets say if I wanted to query to get IDs 101, 102, 114, 212, and 256. [CODE] After running this I get a crash, [CODE] I found related posts but nothing that could answer what I needed.
android|android-sqlite
0
2015-02-28T18:06:06.123Z
2,015
2
18
5
48
0
239
44
2
2
true
true
false
false
false
false
zero
28,785,151
: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.HashMap.get(java.lang.Object)'
<p>I am getting null pointer exception in below code as I mentioned in comment. I am confused why its so and need help. Does the list of people is null ? I am trying to display list of people and someone please explain how this execute() works in active android.</p> <p>Thanks.</p> <pre><code>@Override protec...
I am getting null pointer exception in below code as I mentioned in comment. I am confused why its so and need help. Does the list of people is null ? I am trying to display list of people and someone please explain how this execute() works in active android. Thanks. [CODE] person class [CODE] initalize MyApplication.j...
java|android|nullpointerexception|activeandroid
0
2015-02-28T18:15:30.563Z
2,015
2
18
5
42
0
330
125
4
3
true
true
false
false
false
false
zero
28,785,200
Recalculate directions on Google Maps
<p>I have a simple application which can get two address from the user and get a driving direction, shows on the map too.</p> <p>My question is:</p> <p>How should I handle the case when the user actually uses the app, and he/she doesn't follow the given directions? I mean how should I detect this event and get a new ...
I have a simple application which can get two address from the user and get a driving direction, shows on the map too. My question is: How should I handle the case when the user actually uses the app, and he/she doesn't follow the given directions? I mean how should I detect this event and get a new direction?
android|google-maps|driving-directions
2
2015-02-28T18:20:41.410Z
2,015
2
18
5
1,499
1
311
37
3
0
false
false
false
false
false
false
low
28,785,233
Android Toolbar Covering Content
<p>I am using the new toolbar and setting it as the supportActionBar. My problem is that it is covering my content.</p> <p>Here is the code I am using to setup the toolbar.</p> <pre><code> public void setupNavBar() { mToolbar = (Toolbar) findViewById(R.id.toolbar_actionbar); if (mToolbar != null) { s...
I am using the new toolbar and setting it as the supportActionBar. My problem is that it is covering my content. Here is the code I am using to setup the toolbar. [CODE] The Styles: [CODE] and the layout: [CODE] I thought that by calling setSupportActionbar the system would take care of positioning content below the to...
android|android-actionbar|android-styles|android-toolbar
7
2015-02-28T18:23:45.990Z
2,015
2
18
5
6,437
2
576
32
4
3
true
false
true
false
false
false
medium
28,785,261
Android Studio: Error: SplashActivity is not an Activity subclass or alias
<p>I have a library project which has all functionality and some activities, and I also have a wrapper activity which only has a JSON configuration string and some styling. I imported the library to the wrapper project, and in the wrapper project I'm setting one of the library's activities as the launch activity, but t...
I have a library project which has all functionality and some activities, and I also have a wrapper activity which only has a JSON configuration string and some styling. I imported the library to the wrapper project, and in the wrapper project I'm setting one of the library's activities as the launch activity, but then...
android|android-studio
6
2015-02-28T18:26:49.207Z
2,015
2
18
5
17,575
5
703
74
2
1
true
false
true
true
false
false
medium
28,785,280
Android: How to close database from custom list adapter
<p>How/where can you close a database connection from within a custom list adapter?</p> <p>I have to perform a database look-up from within a custom list adapter. This means that I have to open the database within the adapter. When I change the originating activity to another, I receive a "DatabaseObjectNotClosedExc...
How/where can you close a database connection from within a custom list adapter? I have to perform a database look-up from within a custom list adapter. This means that I have to open the database within the adapter. When I change the originating activity to another, I receive a "DatabaseObjectNotClosedException". I tr...
android|listadapter
0
2015-02-28T18:28:25.910Z
2,015
2
18
5
128
0
468
55
2
1
true
true
false
false
false
false
zero
28,785,284
How to avoid this pesky indexoutofboundsexception - Adding items to JSON Array
<p>My app crashes because I get of INDEXOUTOFBOUNDSEXCEPTION. </p> <p>item = feedItems.get(position); is what's out of bounds.</p> <p>I have this JSON file saved on my SERVER:</p> <pre><code>{ "feed": [ { "id": 1, "name": "Atlanta", "image": "http://i.huffpost.com/gen/...
My app crashes because I get of INDEXOUTOFBOUNDSEXCEPTION. item = feedItems.get(position); is what's out of bounds. I have this JSON file saved on my SERVER: [CODE] I have used these tutorials. http://www.androidhive.info/2014/10/android-building-group-chat-app-using-sockets-part-2/ http://www.androidhive.info/2014/06/...
android|mysql|json|android-volley
1
2015-02-28T18:28:41.917Z
2,015
2
18
5
241
0
1,599
78
4
4
true
true
false
false
false
false
low
28,785,326
libGDX+box2d bouncing ball on touch
<p>I am trying to make a ball bounce on touch with libGDX and box2d, it doesn't bounce just turn around like a sun, can any one help me?</p> <pre><code>@Override public void create() { batch = new SpriteBatch(); BallTexture = new Texture("data/ball.png"); BallSprite = new Sprite(BallTexture); BallSpri...
I am trying to make a ball bounce on touch with libGDX and box2d, it doesn't bounce just turn around like a sun, can any one help me? [CODE]
android|libgdx|box2d
0
2015-02-28T18:33:56.077Z
2,015
2
18
5
771
2
140
35
3
1
true
false
false
false
false
false
zero
28,785,346
Update Activity data from service when its paused
<p>Lets say I have an activity that has a data object. It updates its gui component based on that object. Now lets say that it is paused ( OnPause is called) but not stopped or destoryed</p> <p>Meanwhile , a push notification is received ( intentservice is started) and I need to update that object with the push notifi...
Lets say I have an activity that has a data object. It updates its gui component based on that object. Now lets say that it is paused ( OnPause is called) but not stopped or destoryed Meanwhile , a push notification is received ( intentservice is started) and I need to update that object with the push notification obje...
android|android-sqlite|android-contentprovider|android-lifecycle
2
2015-02-28T18:36:04.810Z
2,015
2
18
5
1,489
4
566
49
4
0
false
false
false
false
false
false
low
28,785,347
Android NDK r10: std::string has not been declared
<p>I'm having problems with the android ndk r10. I get the following: std::string has not been declared. I watched other forum threads like this, but nope of them helped me. My Application.mk looks like this:</p> <pre><code> APP_PLATFORM := android-14 APP_ABI := armeabi-v7a # build for the ARM version of MCPE APP_C...
I'm having problems with the android ndk r10. I get the following: std::string has not been declared. I watched other forum threads like this, but nope of them helped me. My Application.mk looks like this: [CODE] Please help me!
android|c++|android-ndk|java-native-interface|std
0
2015-02-28T18:36:08.690Z
2,015
2
18
5
1,286
1
228
50
5
1
true
false
false
false
false
false
zero
28,785,386
Where can I get a better understanding of the overall and indepth understanding of instantiation with Context parameters?
<p>I am trying to resolve the connection between Context and Classes in this code and my understanding of this concept. The <code>MainActivity.this</code> does not work here. It came with the surrounding code. </p> <pre class="lang-java prettyprint-override"><code>package com.Table; import android.content.Context; im...
I am trying to resolve the connection between Context and Classes in this code and my understanding of this concept. The MainActivity.this does not work here. It came with the surrounding code. [CODE] Reading or copying code is not a problem. The problem exists in the overall thought model of the Context parameter in t...
java|android|sqlite|this|android-context
0
2015-02-28T18:40:17.847Z
2,015
2
18
5
72
1
652
121
5
2
true
false
false
false
false
false
zero
28,785,411
Is it possible to execute ADB shell commands from app?
<p>I have an <a href="http://www.timingpower.com/rk3288" rel="nofollow noreferrer">Android PC</a> with <strong>root</strong> (out-of-box) connected to an external monitor (HDMI &amp; USB) that always displays in landscape, even though my app specifies portrait in the activity declaration in Manifest:</p> <pre><code>an...
I have an Android PC with root (out-of-box) connected to an external monitor (HDMI & USB) that always displays in landscape, even though my app specifies portrait in the activity declaration in Manifest: [CODE] I am trying to execute the following command from this SO post to force portrait: [CODE] This should set the ...
android|shell|adb|screen-orientation
3
2015-02-28T18:42:11.770Z
2,015
2
18
5
6,492
1
865
54
4
3
true
false
true
false
false
false
low
28,785,419
Google API Key for every possible App
<p>So i'm building an app on appcelerator that uses Google Maps API to show some information on Maps (for android).. I've read all the tutorials, and instructions from Google Developers Console about requesting an API Key. As far as I know, an API Key depends on a SHA1 Fingerprint of the keystore you're using to test y...
So i'm building an app on appcelerator that uses Google Maps API to show some information on Maps (for android).. I've read all the tutorials, and instructions from Google Developers Console about requesting an API Key. As far as I know, an API Key depends on a SHA1 Fingerprint of the keystore you're using to test your...
api|google-maps|titanium|sha|android-keystore
0
2015-02-28T18:42:35.527Z
2,015
2
18
5
82
1
1,071
37
5
0
false
false
false
false
false
false
zero
28,785,548
How to reload NetworkImageView
<p>I have an app which is displaying fragment with one NetworkImageView widget from android Volley.</p> <p>The image at URL which is loaded in NetworkImageView is changing every 5 secounds so I want to uptade this image by pressing reload button that I have created in action bar. </p> <p>I have found 2 problems:</p> ...
I have an app which is displaying fragment with one NetworkImageView widget from android Volley. The image at URL which is loaded in NetworkImageView is changing every 5 secounds so I want to uptade this image by pressing reload button that I have created in action bar. I have found 2 problems: If I call this code for ...
android|android-fragments|android-actionbar|reload|networkimageview
0
2015-02-28T18:55:39.900Z
2,015
2
18
5
994
2
851
30
5
3
true
false
false
false
false
false
zero
28,785,553
How do you animate the background of a TextView that has been defined in xml?
<p>For example I have the following as the background of a TextView:</p> <p><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" android:id="@+id/pulsator"&gt; &lt;stroke android:width="4dp" android:colo...
For example I have the following as the background of a TextView: <?xml version="1.0" encoding="UTF-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" android:id="@+id/pulsator"> <stroke android:width="4dp" android:color="#77FF00" /> <corners android:topLeftRadius="10dp" android...
android|xml|animation|textview
0
2015-02-28T18:55:51.917Z
2,015
2
18
5
643
1
977
77
4
3
true
false
false
false
false
false
zero
28,785,556
INSTALL_FAILED_OLDER_SDK in the context of a virtual device, which I don't even use
<p>I have already downloaded all the SDK for everything from Android 2.2(API 8) to the latest Android 5.0.1(API 21), and have everything except television and wearable support. My tools are from SDK 17...24.0.2.</p> <p>It seems everything is ok, but when I try to test with my tablet, I get the "Failure [INSTALL_FAILE...
I have already downloaded all the SDK for everything from Android 2.2(API 8) to the latest Android 5.0.1(API 21), and have everything except television and wearable support. My tools are from SDK 17...24.0.2. It seems everything is ok, but when I try to test with my tablet, I get the "Failure [INSTALL_FAILED_OLDER_SDK]...
android
0
2015-02-28T18:56:12.857Z
2,015
2
18
5
36
0
879
83
1
2
true
true
false
false
false
false
zero
28,785,573
How to display Menu Items overflow android
<p>I want to display my menu items on ActionBar with android I found some samples but It was not what I wanted</p> <p>Menu should be similar picture below(Overflow Icon or text) <img src="https://i.stack.imgur.com/DhOlm.jpg" alt="enter image description here"></p> <p>My menu.xml is : </p> <pre><code>&lt;menu xmlns:a...
I want to display my menu items on ActionBar with android I found some samples but It was not what I wanted Menu should be similar picture below(Overflow Icon or text) My menu.xml is : [CODE] and my android code : [CODE]
android
0
2015-02-28T18:58:15.253Z
2,015
2
18
5
58
2
220
42
1
2
true
false
false
false
false
false
zero
28,785,597
How to combine play & pause button into a single button
<p>Here I have 2 buttons for the audio controller, play and pause. How can I combine both buttons into one? I also need the image icon to change as well.</p> <p>In onCreate, I have initially disabled Pause button.</p> <pre><code>pauseButton.setEnabled(false); </code></pre> <p>Below is the implementation for Play but...
Here I have 2 buttons for the audio controller, play and pause. How can I combine both buttons into one? I also need the image icon to change as well. In onCreate, I have initially disabled Pause button. [CODE] Below is the implementation for Play button. [CODE] Below is the implementation for Pause button. [CODE]
android
1
2015-02-28T19:00:28.690Z
2,015
2
19
5
967
4
315
55
1
3
true
false
false
false
false
false
low
28,785,620
Radio button group in MobileFirst Android
<p>I want to put two radio buttons (male and female) in my application.</p> <p>I did so using radio buttons (not group) but the problem is: a button can not be unchecked also both can be checked at the same time</p> <p>RadioButton group is a group of three buttons and I only need two. Is there a way they can be two?...
I want to put two radio buttons (male and female) in my application. I did so using radio buttons (not group) but the problem is: a button can not be unchecked also both can be checked at the same time RadioButton group is a group of three buttons and I only need two. Is there a way they can be two? So any help?
android|radio-button
0
2015-02-28T19:02:51.410Z
2,015
2
19
5
39
1
313
41
2
0
false
false
false
false
false
false
zero
28,785,625
Taking photo intent with cropped image preview
<p>I am making an application where I need to take a photo and then crop a 100x100 area from it. Right now I am making an intent call for taking a picture and then I create a CropActivity that will crop it.</p> <p>I was wondering if default photo application could be set crop taken picture and show a border on screen ...
I am making an application where I need to take a photo and then crop a 100x100 area from it. Right now I am making an intent call for taking a picture and then I create a CropActivity that will crop it. I was wondering if default photo application could be set crop taken picture and show a border on screen to identify...
android|image|android-intent|crop|photo
0
2015-02-28T19:02:59.973Z
2,015
2
19
5
172
2
606
46
5
0
false
false
false
false
false
false
zero
28,785,737
customize android google map direction line
<p>I had implemented <a href="http://wptrafficanalyzer.in/blog/drawing-driving-route-directions-between-two-locations-using-google-directions-in-google-map-android-api-v2/" rel="nofollow">this</a> code for google map direction between two poin . now I want to customize this line between this two point . but I can't se...
I had implemented this code for google map direction between two poin . now I want to customize this line between this two point . but I can't see any API or value for this work . how can I customize this line color , width , .... thank you .
java|android|google-maps|google-maps-android-api-2
0
2015-02-28T19:13:26.597Z
2,015
2
19
5
239
1
242
43
4
0
false
false
false
false
false
false
zero
28,785,759
AdMob SMART_BANNER not working in landscape mode
<p>I am using SMART_BANNER in an android project. It is working properly in portrait mode but when the orientation changes(to landscape), the banner width remains same. This is my layout with adview:</p> <pre><code>&lt;LinearLayout android:id="@+id/adLayout" android:layout_width="match_parent" ...
I am using SMART_BANNER in an android project. It is working properly in portrait mode but when the orientation changes(to landscape), the banner width remains same. This is my layout with adview: [CODE] I've also tried android:layout_width="wrap_content" for LinearLayout that contains the banner and android:layout_wid...
android
4
2015-02-28T19:15:17.080Z
2,015
2
19
5
827
3
367
48
1
1
true
false
false
false
false
false
low
28,785,765
ActionBar is null after migration to Gradle
<p>This is a really weird error as far as I can understand. I just migrated a project from ADT to Gradle. And the same exact code is now crashing on startup. It seems the problem is that the ActionBar that previously was perfectly valid now is null.</p> <p>The code is within a class that <code>extends Activity</code>...
This is a really weird error as far as I can understand. I just migrated a project from ADT to Gradle. And the same exact code is now crashing on startup. It seems the problem is that the ActionBar that previously was perfectly valid now is null. The code is within a class that extends Activity and is called from withi...
android|gradle|android-actionbar|adt
0
2015-02-28T19:15:55.347Z
2,015
2
19
5
54
1
530
43
4
1
true
false
false
false
false
false
zero
28,785,809
setText does not work when I call it in another class
<p>I am calling setText() for a number of TextViews in different activities, so I though I should define a function for this.<br> In my OnCreate method i am using the following code to call the function:</p> <pre><code> super.onCreate(savedInstanceState); setContentView(R.layout.activity_myAct); View infla...
I am calling setText() for a number of TextViews in different activities, so I though I should define a function for this. In my OnCreate method i am using the following code to call the function: [CODE] My OpenWithTitles function is as follows: [CODE] and the SetTextView function is as follows: [CODE] I have defined m...
android
0
2015-02-28T19:19:38.100Z
2,015
2
19
5
59
1
969
53
1
3
true
false
false
false
false
false
zero
28,785,867
Projects run with Eclipse but won't run with Android Studio
<p>I imported a working app from Eclipse to Android Studio (AS) 1.0.2. I unchecked - replace jars with dependencies when possible - replace library sources with dependencies when possible - create Gradle-style module names (I've also tried this import with all three checked)</p> <p>This app uses Google Maps V2 but I ...
I imported a working app from Eclipse to Android Studio (AS) 1.0.2. I unchecked - replace jars with dependencies when possible - replace library sources with dependencies when possible - create Gradle-style module names (I've also tried this import with all three checked) This app uses Google Maps V2 but I kept maps.ja...
android|google-maps|android-studio
0
2015-02-28T19:24:37.943Z
2,015
2
19
5
147
0
1,616
59
3
0
false
true
false
false
false
false
zero
28,785,884
Spring Security Angularjs + Android REST
<p>I am wondering what is the best approach to implement Spring Security to secure a REST api that will be accessed by two types of clients, Angularjs and Android.</p> <p>I have read many sources online in search of the perfect answer but I have not found what I am looking for (as of yet).</p> <p>Ideally, the two cli...
I am wondering what is the best approach to implement Spring Security to secure a REST api that will be accessed by two types of clients, Angularjs and Android. I have read many sources online in search of the perfect answer but I have not found what I am looking for (as of yet). Ideally, the two clients will go throug...
android|angularjs|spring|spring-security|oauth-2.0
4
2015-02-28T19:26:16.023Z
2,015
2
19
5
214
0
1,467
40
5
0
false
true
false
false
false
false
low
28,785,926
Android Display a DialogFragment when an option is clicked in a NavigationDrawer
<p>I need to display a DialogFragment when the "logout" option is selected inside a NavigationDrawer. Currently, I have implemented the following code but it does not work. Please, if someone know how to do it, tell me.</p> <p>The implicated case in the switch is the third.</p> <p>I have the following code:</p> <p>I...
I need to display a DialogFragment when the "logout" option is selected inside a NavigationDrawer. Currently, I have implemented the following code but it does not work. Please, if someone know how to do it, tell me. The implicated case in the switch is the third. I have the following code: In MainActivity extends Acti...
android|navigation-drawer|android-dialogfragment
1
2015-02-28T19:31:13.940Z
2,015
2
19
5
702
0
434
80
3
3
true
true
false
false
false
false
low
28,785,960
What does (savedInstanceState) mean
<p>In my main activity there is some code which says</p> <pre><code>if (savedInstanceState != null) { mCurrentSelectedPosition = savedInstanceState.getInt(STATE_SELECTED_POSITION); mFromSavedInstanceState = true; </code></pre> <p>and I don't quite understand what the <code>(savedInstanceState)...
In my main activity there is some code which says [CODE] and I don't quite understand what the (savedInstanceState) means in this code. Can someone tell me what it means in this context because I'm sort of a noob and I want to understand the code so that I can learn it, understand it and even replicate it when needed.
java|android|navigation-drawer
3
2015-02-28T19:34:16.467Z
2,015
2
19
5
802
2
319
35
3
1
true
false
false
false
false
false
low
28,786,117
No Activity Found to handle Intent in the class file
<p>I am pretty new to Android. I am learning about passing Intents within activities. Here is my code to pass Intent between 2 activties.</p> <ol> <li><p>MainActivity.java</p> <pre><code>public class MainActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onC...
I am pretty new to Android. I am learning about passing Intents within activities. Here is my code to pass Intent between 2 activties. MainActivity.java [CODE] layout2.java [CODE] Manifest.xml [CODE] When i run this code and click on the OK button to pass the data, my app crashes with a fatal error. The error is: [CODE...
java|android|android-intent|android-activity
0
2015-02-28T19:49:11.140Z
2,015
2
19
5
118
2
420
52
4
4
true
false
false
false
false
false
zero
28,786,206
ListPopUpWindow in ScrollView in Android
<p>I have created <code>ListPopupWindow</code> in <code>Activity</code> containing <code>ScrollView</code>. When I show it by setting a view that is at the bottom of the screen as the anchor point and the space at from the anchor point to the screen end is less than the height of the <code>ListPopUpWindow</code> it sho...
I have created ListPopupWindow in Activity containing ScrollView . When I show it by setting a view that is at the bottom of the screen as the anchor point and the space at from the anchor point to the screen end is less than the height of the ListPopUpWindow it shows a thick border around it. Please suggest how to rem...
android
0
2015-02-28T19:58:39.550Z
2,015
2
19
5
321
1
350
40
1
1
true
false
false
false
false
false
zero
28,786,242
AdMob not working in app
<p>So, my problem that AdMob banner not working in my app, I have done exactly like here: <a href="https://developers.google.com/mobile-ads-sdk/docs/admob/android/quick-start" rel="nofollow">https://developers.google.com/mobile-ads-sdk/docs/admob/android/quick-start</a></p> <p>and when I start my app on my phone there...
So, my problem that AdMob banner not working in my app, I have done exactly like here: https://developers.google.com/mobile-ads-sdk/docs/admob/android/quick-start and when I start my app on my phone there is no banner at all, what I can do to fix this? My publisher id correct, I checked it several times. Here my code o...
android|google-play|admob
0
2015-02-28T20:03:01.553Z
2,015
2
20
5
907
2
412
24
3
3
true
false
false
false
false
false
zero
28,786,310
Android FragmentPagerAdapter detect if user has visited a specific tab
<p>I have multiple tabs using FragmentPagerAdapter but the ViewPager creates a page before and after my current tab and the <code>OnCreate()</code> method gets called even when I'm not on that tab. It becomes really difficult to run a specific operation on a specific tab rather than executing before visiting the tab. I...
I have multiple tabs using FragmentPagerAdapter but the ViewPager creates a page before and after my current tab and the OnCreate() method gets called even when I'm not on that tab. It becomes really difficult to run a specific operation on a specific tab rather than executing before visiting the tab. Is there anyway s...
android|android-fragments|fragmentpageradapter
0
2015-02-28T20:09:18.037Z
2,015
2
20
5
333
2
424
70
3
2
true
false
false
false
false
false
zero
28,786,330
How to run a shell script in android app?
<p>I have one shell script placed in /sdcard/test.sh And the test.sh file has the below command. <code>screenrecord --time-limit 10 /sdcard/sreee.mp4</code></p> <p>When I run this command from adb shell command from Windows machine command executed successfully without any errors.</p> <p>My Question is how can I exec...
I have one shell script placed in /sdcard/test.sh And the test.sh file has the below command. screenrecord --time-limit 10 /sdcard/sreee.mp4 When I run this command from adb shell command from Windows machine command executed successfully without any errors. My Question is how can I execute the same script from Android...
android|shell|adb
3
2015-02-28T20:11:10.510Z
2,015
2
20
5
2,207
0
419
41
3
0
false
true
false
false
false
false
low
28,786,349
Eclipse can't render Android layout
<p>Eclipse gives the following error when I try to add "android.support.v7.widget.Toolbar"</p> <pre><code>The following classes could not be instantiated: - android.support.v7.widget.Toolbar (Open Class, Show Error Log) See the Error Log (Window &gt; Show View) for more details. </code></pre> <p>Layout rendering err...
Eclipse gives the following error when I try to add "android.support.v7.widget.Toolbar" [CODE] Layout rendering error
android|eclipse|layout|render
1
2015-02-28T20:12:39.837Z
2,015
2
20
5
84
0
117
35
4
1
true
true
false
false
false
false
low
28,786,388
How to handle 500 Internal Server Error when using JSON
<p>I am relatively new to Android and I am using JSON to get data from a server. On the first loop at line 22, the StringBuilder contains, 500 Internal Server Error and then the jArray ends up coming back null. How can I handle this error?</p> <pre><code>public static JSONObject getJSON() { String jsonString = "";...
I am relatively new to Android and I am using JSON to get data from a server. On the first loop at line 22, the StringBuilder contains, 500 Internal Server Error and then the jArray ends up coming back null. How can I handle this error? [CODE]
android|json
3
2015-02-28T20:18:06.527Z
2,015
2
20
5
21,047
5
243
55
2
1
true
false
true
true
false
false
low
28,786,504
Building a TimePickerDialog method
<p>I got 4 EditText views with different variables for each of them. I want to call a TimePickerDialog when clicking on each one of the EditText views and pass the relevant parameters each time, so I was trying to build a method for this instead of writing the whole code 4 times:</p> <pre><code>public TimePickerDialog...
I got 4 EditText views with different variables for each of them. I want to call a TimePickerDialog when clicking on each one of the EditText views and pass the relevant parameters each time, so I was trying to build a method for this instead of writing the whole code 4 times: [CODE] than for each EditText's onClick i ...
android|methods|datetimepicker
0
2015-02-28T20:28:26.087Z
2,015
2
20
5
186
1
530
34
3
5
true
false
false
false
false
false
zero