background preloader

Android

Facebook Twitter

Android: Is there a good way to create a Toast-like dialog. Networking - Android Volley - Quickstart. Android: Expand/collapse animation. A successful Git branching model » nvie.com. Note of reflection (March 5, 2020)This model was conceived in 2010, now more than 10 years ago, and not very long after Git itself came into being.

A successful Git branching model » nvie.com

In those 10 years, git-flow (the branching model laid out in this article) has become hugely popular in many a software team to the point where people have started treating it like a standard of sorts — but unfortunately also as a dogma or panacea.During those 10 years, Git itself has taken the world by a storm, and the most popular type of software that is being developed with Git is shifting more towards web apps — at least in my filter bubble. Web apps are typically continuously delivered, not rolled back, and you don't have to support multiple versions of the software running in the wild.This is not the class of software that I had in mind when I wrote the blog post 10 years ago. Why git? ¶ For a thorough discussion on the pros and cons of Git compared to centralized source code control systems, see the web.

The main branches ¶ develop. A Volley adapter for JSON requests that will be parsed into Java objects by Gson. Android ListView jerky when scrolling. Free vectors icons for download and Icon font. Android - How to handle Handler messages when activity/fragment is paused. Android: Want to set custom fonts for whole application not runtime.

Add floating point value to android resources/values. Device and Viewport Size In JavaScript. To experience full functionality of this page, you need to enable JavaScript.

Device and Viewport Size In JavaScript

All outputs will appear undefined when JavaScript is off. Click <a href=" to learn how to enable JavaScript</a>. Viewport: How to get viewport size. jQuery(window).width() uses document.documentElement.clientWidth and is regarded as cross-browser compatible. Android Asset Studio - Simple Nine-patch Generator. Geolocation - Good way of getting the user's location in Android. How to use java.net.URLConnection to fire and handle HTTP requests.

How to customize the look of a SeekBar in Android. Java - Tap outside Android dialog to dismiss it. Force git to overwrite local files on pull. Android Google Maps V2 - MapView in XML. Android - How do you to retrieve dimensions of a view? Getheight() and Getwidth() always return zero. Bend StreetView on Android to your will. With the last major release of our Android app we added in Street View capability on property detail pages.

Bend StreetView on Android to your will

The response we got from users was extremely positive but we couldn’t help but notice a few issues that really degraded a user’s experience. First, we assumed (incorrectly) that the built in Street View app would be available on all Android phones. And how did that work out? The stack traces in the Market crash reports told the whole story: some people didn’t have the app installed. Secondly, we were unable to determine if a location actually had street view information available from Google. Thirdly, even if the user had Street View installed and the street view for the property actually existed, we were forced to use the default yaw (angle) when firing our Intent. So the question became how to overcome the limitations of the Android Maps API and squash all three of these issues.

So how did we do it? Then you can call it like this: Minimize the calls to the JS Map API. Android Load html pages stored in assets folded in a webview. Using Google Street View in Android Applications. Street View is a nice feature Google have created for us to see street level images of our current position or specified location... you can find more information on getting your current location in this post.Using street view in android applications can be accomplished in a number of ways depending on the final objective.

Using Google Street View in Android Applications

The two ways I'm going to explain here is 1. Using Street View Intent and 2. Using Street View inside an embedded Web View. There are benefits to each of these methods but each will have their drawbacks and limitations when you start to explore further.1. Using Street View Intent The street view intent is the quick and easy way to see a location at street level with the minimal code and effort. Try { How to create Transparent Activity in Android. How to format number in android EditText after realtime editing. Android - Programmatically collapse a group in ExpandableListView. Create a Custom-Styled UI Slider (SeekBar) in Android.

An Android slider (or a SeekBar as it’s called in the Android world) is a pretty slick UI tool which we recently used in our Call Your Folks!

Create a Custom-Styled UI Slider (SeekBar) in Android

App as a means of choosing a reminder frequency between one day and three months. I’ll walk you through creating a custom-styled seekbar for your Android application using nothing but a few XML and image drawables. In this tutorial, I assume that you know how to implement a SeekBar in your app; if you don’t, check out the Android API demos, specifically SeekBar1.java and seekbar_1.xml. Step 1: Create Your Image Drawables (9-Patch) Before creating any XML drawables, make sure you create the image drawables (including one 9-patch drawable) needed for the seekbar background, handle, and progress sections. Create the following drawables and place them in your /res/drawable/ folder: Step 2: SeekBar Progress Drawable The above XML first draws a semi-transparent, blue gradient, then layers the semi-transparent stripe image on top of the gradient. Seekbar - Android - styling seek bar. Canvas.drawArc() Package com.exercise.AndroidDraw; import android.app.Activity; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Path; import android.graphics.RectF; import android.os.Bundle; import android.view.View; public class AndroidDrawActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(new MyView(this)); } public class MyView extends View { public MyView(Context context) { super(context); // TODO Auto-generated constructor stub } @Override protected void onDraw(Canvas canvas) { // TODO Auto-generated method stub super.onDraw(canvas); float width = (float)getWidth(); float height = (float)getHeight(); float radius; if (width > height){ radius = height/4; }else{ radius = width/4; }

canvas.drawArc()

How to fix the "ClassDefNotFoundError" with ADT 17. Posted by Foxykeep on 22/03/2012 So I updated my SDK and ADT to version 17 and once again I got a big problem :) Every project I have which use JAR libraries could still be built without problems but as soon as they start on the phone, they crashed with the following error : I asked Xavier Ducrohet and Tor Norbye (both working on the ADT plugin) on Google+ about the error and they linked to this page which explains how to solve the problem but is not ultra clear (at least for me).

How to fix the "ClassDefNotFoundError" with ADT 17

So here is the same solution but explained with screenshots so we can see more easily what changed : From left to right, we have : My project with ADT 16 (the small graphic changes are due to the fact the left image is from Eclipse Windows while the 2 on the right are from Eclipse Mac)My project with ADT 17 before the fixMy project with ADT 17 after the fix. Android - How to get screen dimensions. StackWidget - StackView Widget. ← Back This sample shows how to construct a simple collection widget. This particular example shows how to create a widget containing a StackView ; however, only minimal changes are required to include a ListView, GridView or AdapterViewFlipper instead. The sample demonstrates the following: The pattern for creating and wiring a RemoteViewsService and RemoteViewsFactory which serve the function of an adapter for the widget collection.

The pattern for setting an intent template and fill-in intents in order to provide children of the collection with click behaviour. Subdirectories Files. Android: allow portrait and landscape for tablets, but force portrait on phone. Converting pixels to dp in android. Android Widget onReceive can't call Service class. Take your time – Widgets and AlarmManager. What is intent in android.

Libraries