spot7.org logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
  Home » ANDROID » Page 25
Apache Cordova Android 5.0 Select Box Option color [RESOLVED]
After quite some time I was able to figure this out. I was apparently jsut changing the theme for the Application tag in the manifest.xml and needed to make the change in both the application and activity tags. After changing both to "android:style/Theme.Light.NoTitleBar" I now have black text on white backgrounds in my app.

Categories : Android

Custom Slider Android
You can use just a regular seekbar and rotate it 90 degrees and set custom drawables to look like in your picture. <SeekBar android:id="@+id/seekBar1" android:layout_width="match_parent" android:layout_height="wrap_content" android:rotation="90" /> And to acquaire zero value at center you can use simple calculation, something like this: private int getSeekbarValue(){

Categories : Android

Material Design - What does 'use the tint 700' mean?
Look at the color palettes on the material design spec page (http://www.google.com/design/spec/style/color.html#color-color-palette). Each tint in a palette has a number—that's what the 700 refers to.

Categories : Android

Android SDK: Linear Layout won't wrap text vertically
looking at the pictures I understand that you want to position the button and the radiobutton at the bottom right? In that case, you're root layout is supposed to be a relativeLayout and the RadioButton and the Button must be enclosed by a LinearLayout with the property alignParentBottom="true"

Categories : Android

How to test my App with Automated tools
I can recommend Calabash from personal experience as being a good option. https://github.com/calabash/calabash-android A good starting point would be to follow the installation and basic set up sections from their git pages, then to write a basic test using the predefined steps. Once you have something running you can look at more complicated things like writing your own steps (easier to main

Categories : Android

Android HttpPut to Django REST Framework - data not updating
The solution seems to be simpler than I thought: Make sure there is a trailing slash in the target URL. So http://mydomain/api/26/ instead of http://mydomain/api/26. This does not seem to matter when sending the PUT request from Postman, but from Android, omitting the trailing slash appears to cause the request to be redirected, and in the process it turns into a GET. I think the underlying issue

Categories : Android

How to display a streetview preview
You can load the street view image by using the Google Street View Image API. You can specify location and image size etc in the image request URL. private static String imageURL = "https://maps.googleapis.com/maps/api/streetview?size=400x400&location=40.720032,-73.988354&fov=90&heading=235&pitch=10"; For requesting image, You can use Square's Picasso library: Picasso.with(th

Categories : Android

fragment - getView() method return NULL
You should notice that commit() will run on Handler.post(). That means that your fragment's view will be created AFTER onNavigationDrawerItemSelected. Better if you call view-related-methods from inside fragment to constrain view's lifecycle.

Categories : Android

clicking on the fragment invokes fragment behind
It sounds like your surface view has not been told to respond to touch events. Try making it clickable, either with android:clickable="true" or setClickable(true). That should prevent touch events from passing through the surface view to the fragment below. Another trick I've used, for views that don't need to respond to touch, but do need to prevent events from going through them, is to add a

Categories : Android

Support GPS in Tablet not embedded
You can use the Mock GPS facility in android to test your app. Of course you will not get the real location.

Categories : Android

What does the "Neighboring cell" mean in the class of "NeighboringCellInfo"?
As njzk2 said, the response is in the other question. But yes, it should return the info of the neighbor cell. But I've tried myself, and discovered that the list obtained in telephonymanager.getallcellinfo() was not empty, but was very difficult to handle.

Categories : Android

How to solve "Failed to find provider info for com.my.package.urbanairship.provider"?
I don't see a provider defined in your manifest. You should have something like this: <provider android:name="provider" android:authorities="com.my.package.urbanairship.provider" android:exported="false"/>

Categories : Android

How to find distance between two points( two pair cordinates)Using JSON??Using two latitudes and longitudes?
Use location1.distanceto(location2) to get the value in meters. where location1 and location2 are source and destination respectively. And it is not necessary to use google maps to find this distance. Cheers

Categories : Android

How can we hide call logs of specific contact in android?
Perhaps a better approach would be to register a ContentOberver on the call log table. See this question: How to implement a ContentObserver for call logs Whenever an update is made to the table, you could query for the phone number in question and delete the record.

Categories : Android

Using Master Detail Flow, how do i make buttons i added in activity_item_detail.xml clickable
I have tried your code and it seems working. Please find below the source code. activity_main.xml <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/item_detail_container" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".ItemDetailActivity" tools

Categories : Android

ListFragment doesn't re-display data when calling it from FragmentStatePagerAdapter
If you are inflating Fragment inside Fragment you should use getChildFragmentManager() instaed of getFragmentManager(). Here is the doc : http://developer.android.com/reference/android/app/Fragment.html#getChildFragmentManager() public class TrendsPagerHolder extends Fragment { private ArrayList<String>testArray = new ArrayList<String>(); private Context context; private SharedPrefe

Categories : Android

Visual Studio 2015 Android Emulator issue
Do you see any error message in the beginning regarding ADB? Considering that it is working on cordova, try rebooting once to make sure there is no one-off problems. If that doesn't work, you can manually connect adb using adb connect <ip>:5555 And then try the project again. Also, make sure you have all the pre-requisite installed in your machine. When you create a new project, it wil

Categories : Android

Android SQLLite, Syntax error when trying to get data from database
There is double space after your SELECT command. String selectQuery = "SELECT * FROM " + MySQLiteHelper.TABLE_CATEGORIA; Remove the extra space after 'SELECT' and it should work. String selectQuery = "SELECT * FROM " + MySQLiteHelper.TABLE_CATEGORIA;

Categories : Android

android app hangs starting a service
try this for your onStartCommand: @Override public int onStartCommand(Intent intent, int flags, int startId) { TODO do something useful return Service.START_NOT_STICKY; }

Categories : Android

How to track buses of my city in my android app?
My city's bus company is locked into a contract with some scummy, incompetent software company, won't share their data, and have taken pains to make it difficult to scrape from the nearly useless map on their website. I figure if you had enough users (i.e., a high probability of at least one on every bus) then you could build a real-time map of the bus system without any official assistance. The

Categories : Android

Clicking toolbar navigation icon crashes the app
I have the navigation working with the following implementation. @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: //implement action } }

Categories : Android

How to pass string from mainActivity to service?
Intents are a good way to do that. public class Service extends IntentService { private final static String TAG = "a tag"; private final static String GET_POWER_INTENT = "your.intent"; /*** * Constructor */ public Service() { super(TAG); } @Override protected void onHandleIntent(Intent intent) { Log.d(TAG, "onHandleIntent"); if (extras.containsKey("EXTRA_NAME")) {

Categories : Android

Simpliest solution to a circular image in android?
In the latest support library you can use RoundedBitmapDrawable to create a drawable of your image then you pass that into your imageview

Categories : Android

Titanium - ProxyFactory: failed to find class for ti.modules.titanium.network.HTTPClientProxy
I am seeing a similar problem. What I noticed is that the entire device (Nexus 7, Android 4.4.2) didn't have a network connection (i.e. I couldn't browse the Internet with the Chrome browser, even though I seemed to be be connected to my usual wireless network). I don't know yet what might have caused the problem, but rebooting my device solved it for me. You might want to verify that you have n

Categories : Android

Constructor is undefined?
The Fragments in your List are not the same type. Look at your imports: MessaginActivity import android.app.Fragment; MyTabsPagerAdapter import android.support.v4.app.Fragment; Change your fragments in MessaginActivity to support fragments.

Categories : Android

Force onRestart() from onStop() state
Your activity should not have threads working in the background. And it shouldn't try to "force" onRestart while another activity is active (for example, if the user takes a phone call, they probably don't want your app popping up in the middle of the call). What you probably need to do is use a Service to get the background threads to do their job "in the background" while your activity is not a

Categories : Android

Theming the action bar
Double check that you aren't setting the action bar theme programmatically (e.g. in your activity.java). Also, double check your activity.xml for anything that may possibly be overriding your manifest's changes to the actionbar.

Categories : Android

Picasso library is not loading images from the server correctly in a listview
If you are using Target's - they should be strong referenced objects. Create field mTaget in your class and move Target's initialization from onBindViewHolder method. Edit: hold auth keys in secure place, like keystore. Don't save them in SharedPreferences, it's a bad practice. Update: 1) create custom Target class public class CommonImageTarget implements Target { private final ImageView

Categories : Android

How clean text in search view when click outside
SQLite has limited ALTER TABLE support that you can use to add a column to the end of a table or to change the name of a table. If you want to make more complex changes in the structure of a table, you will have to recreate the table. You can save existing data to a temporary table, drop the old table, create the new table, then copy the data back in from the temporary table. For example, suppose

Categories : Android

Android: difficulties referencing resources
What is R pointing at in your code? It should point at something like your.package.name.R. If it is pointing to Android.R, it won't work. Remove import Android.R and import Android.R.*, then it should be OK.

Categories : Android

Ideas for android navigation bar (below action bar)
Keep the buttons in the layout of your main activity. Have them call a function lets say loadFragment(Button button) on click. This function then handles switching of the fragments, and you can change the display of the navigation buttons inside this function itself to highlight the appropriate button or something equivalent.

Categories : Android

Slide Up an image using EventMotion in Android
I am expecting the MOTION_UP should be intercepted when the user touches the screen and drags the finger up the screen. Uh, no. Docs to the rescue: public static final int ACTION_DOWN A pressed gesture has started, the motion contains the initial starting location. Think of ACTION_DOWN as the very start of user interaction. DOWN DOES NOT INDICATE DIRECTION. In a crude sense, it tel

Categories : Android

Converting Gson to Object?
First problem is that your User class does not represent the JSON you're getting back from the web service, but it only represents the "return" field inside the response... Try creating another class that does represent the JSON response, something like: public class Response { @SerializedName("return") private User user; // getter & setter } And then response = gson.fromJso

Categories : Android

Eclipse: Do I need to uninstall my current version of the ADT plugin to use an older one?
1 - Create your download url: http://dl.google.com/android/ADT-##.#.#.zip. Google uses the version number for the downloads, so if you need 10.0.1, your download would be http://dl.google.com/android/ADT-10.0.1.zip. 2 - Uninstall the current ADT version in Eclipse. 3 - Install the new version as an archive!

Categories : Android

FragmentStatePagerAdapter doesn't call getItem on tab reselection
Im pretty sure that returning POSITION_NONE in getItemPosition(Object object) will solve your problems: public int getItemPosition(Object object){ return POSITION_NONE; } more info

Categories : Android

Changing Actionbar Background programmatically in one activity, changes in whole application
What is your context here? If it is pointing to the Application, it might do so. Try directly using getActionBar().setBackgroundDrawable(mActionBarBackgroundDrawable); in your Activity or if you are calling from Fragment getActivity()getActionBar().setBackgroundDrawable(mActionBarBackgroundDrawable);

Categories : Android

Design a round button over two colored layouts
you can use RelativeLayout for your parent and try adding twoLinearLayouts , one below another and set their heights, now place a Button in your RelativeLayout and set android:layout_centerInParent="true" for your Button . and if you want to use weight for layouts, instead of adding two LinearLayout to your RelativeLayout, add one LinearLayout with weightSum=100 and then add two LinearLayouts to i

Categories : Android

how to expand a card in a custom Android Wear app?
If you want your card to be expanded simply don't set the expansion factor and have cf.setExpansionEnabled(true). This should expand all your cards to the needed size to show all the content. On the other side if you try to achieve something like this: Start with all cards collapsed Swipe down until you decide to expand a certain card Click to expand it Scroll down until you read it all, then

Categories : Android

Start Service after boot
You cannot call startService() and start an Activity. You would have to call startActivity(). Note that this is not a recommended pattern as most users do not want to see an app every time they boot.

Categories : Android


Recently Add
Wait for all requests in Android Volley
android scrollview not working
Android: How to prevent a Wifi disconnect on DHCP renewal?
Using HorizontalScrollView for gallery - no pictures inside
-bash: export: not a valid identifier
m3u8 Video stops with MediaPlayer: Error (1,-1004)
java.lang.IndexOutOfBoundsException at ListView android
Facebook REST calls for mobile cross-platform app
How to returning image from camera intent and placing in google maps api v2 as thumbnail
How can I add a row to a ListView in one Fragment by clicking the button in another Fragment?
Using MediaController on Android 5
Is TCP packet filtering possible on mobile platforms?
Spinner from editext android
Incomplete file downloaded in android using DataInputStream
How do I delete a row form SQLite DB via ListView and refresh list view?
Change action bar to toolbar, and now I am having force closes. What am I doing wrong here?
Adding buttons below GraphView, all inside a Fragment
Get rotation and display in degrees
What methods are available to execute things in the background
Data Persistence Android
Intent not delivered correctly
Android Studio 1.0 RC 1 Gradle build issues - Could not run build action using Gradle installation
otto eventbus for android behaves differently in release build
How get item ID from ListFragment in android?
Receive bluetooth connection changes after reboot
Encrypting plain-text passwords and passing variables to xml for display in android
android html5 video fullscreenchange not called on entering fullscreen
Want to create API for my android application done using Intel XDK
Gps not getting location
Spannable Text is not working in Dialog Fragment
© Copyright 2017 spot7.org Publishing Limited. All rights reserved.