background preloader

Android

Facebook Twitter

Android Live Wallpaper. Android Live Wallpaper - Tutorial Copyright © 2011, 2012 vogella GmbH Android Live Wallpaper This tutorial describes the creation of live wallpapers for Android.

Android Live Wallpaper

It is based on Eclipse 4.2, Java 1.6 and Android 4.1 (Ice Cream Sandwich). Live Wallpapers are animated, interactive backgrounds for the Android home screen. 2.2. Pushing the ActionBar to the next level. Back in November 2012, I wrote a blog post entitled “ActionBar on the Move”.

Pushing the ActionBar to the next level

This article was mainly dealing with a technique to nicely and uniquely animate your ActionBar. Although I mentioned some of the effect’s possible applications, I never had time to effectively add an ActionBar animation to one of my own apps nor saw an application on the Play Store taking advantage of it. While being at Google I/O last week, I finally found an application using the ActionBar animation technique. Let’s be honest, it literally blew my mind the first time I saw it. I felt in love with the nice, subtle and yet extremely useful animated effect probably more than the entire app itself!

The latest update of Play Music (v5.0) has been completely redesign and features a brand new artist/album detail screen. Here are two main advantages of this ActionBar animation: Google Play Game Services: Leaderboards. Google Play Game Services: Achievements. With Google Play Games Services, you can build a range of features into your Android apps, including leaderboards, achievements, multiplayer gameplay, cloud storage, and Google+ sign-in.

Google Play Game Services: Achievements

In this tutorial we will work through the steps you need to take to add achievements to a simple Android game. We will prepare the development environment to use Google Play Game Services, define an achievement in the Developer Console and implement the achievement interaction in the game. To utilize the Google Play Game Services tools, we need to prepare our IDE. As well as using the Google Play Services library—which you need for all Google services—we will use the BaseGameUtils resource, which contains a number of classes that are particularly useful when developing games.

Start by creating a new app in your IDE. If you're not using the sample app in the download, you may wish to implement your gameplay at this point, bearing in mind what you are going to use an achievement for. Android EditText text change listener example. Android - how to implement a long click listener on a listview. Networking - How to check internet access on Android? InetAddress never timeouts... Android JSON Parser Tutorial. JSON stands for JavaScript Object Notation.It is an independent data exchange format and is the best alternative for XML.

Android JSON Parser Tutorial

This chapter explains how to parse the JSON file and extract necessary information from it. Android provides four differnet classes to manipulate JSON data. These classes are JSONArray,JSONObject,JSONStringer and JSONTokenizer. The first step is to identify the fields in the JSON data in which you are interested in. For example. JSON - Elements An JSON file consist of many components. Android AsyncTask sending data via http Post.

Video Listing. Overlaying the Action Bar. Figure 1.

Overlaying the Action Bar

Gallery's action bar in overlay mode. To avoid resizing your layout when the action bar hides and shows, you can enable overlay mode for the action bar. When in overlay mode, your activity layout uses all the space available as if the action bar is not there and the system draws the action bar in front of your layout. Android:actionBarStyle requires API level 11. อ่านข้อมูล JSON ด้วย Gson บน Android. บทความนี้จะมาพูดถึง การเขียนแอพพลิเคชันแอนดรอยส์เพื่อดึงข้อมูล JSON โดยมาแสดงเป็น ListView ในส่วน ListView ก็จะใช้เป็น Custom ListView ครับ บทความนี้จะครอบคลุมเนื้อหาเรื่องใหญ่ๆ 3 เรื่องเลย ได้แก่ การอ่านข้อมูล JSONการทำ Custom ListView การใช้ AsyncTask ตัวอย่างในบทความนี้ ผมจะใช้ JSON API ของทาง Teamtreehouse ครับ จากลิงค์นี้ ซึ่งเป็น API ที่ไว้แสดงบทความในบล็อค หน้าตาของ JSON จะมีประมาณนี้ จากรายชื่อใน JSON ก็จะมี JSONObject ชื่อ posts นั้นมีรายชื่อบทความแต่ละบทความอยู่ ภายในแต่ละบทความ ก็จะมี id, url ของบทความ, ชื่อบทความ, วันที่โพส, ชื่อผู้โพส และ Path ของรูป thumbail เราจะใช้ข้อมูลพวกนี้แหละครับ มาแสดงในแอพของเรา.

อ่านข้อมูล JSON ด้วย Gson บน Android

Android GridView Padding and Pagination. Multithreading For Performance. [This post is by Gilles Debunne, an engineer in the Android group who loves to get multitasked. — Tim Bray] A good practice in creating responsive applications is to make sure your main UI thread does the minimum amount of work.

Multithreading For Performance

Any potentially long task that may hang your application should be handled in a different thread. Typical examples of such tasks are network operations, which involve unpredictable delays. Users will tolerate some pauses, especially if you provide feedback that something is in progress, but a frozen application gives them no clue. In this article, we will create a simple image downloader that illustrates this pattern. An Image downloader. Android กับการใช้งาน AsyncTask. เชื่อว่าหลายๆคนที่เขียน Android Application ต้องมีความคุ้นเคยกับ AsyncTask กันแน่นอน โดยเฉพาะเมื่อต้องการเชื่อมต่อ Internet ผ่าน HTTP ต่างๆ ล้วนต้องใช้ AsyncTask มาช่วยทั้งสิ้น หรือเวลาต้องการประมวลผลอะไรไว้ที่ background thread เพื่อไม่ให้กระทบกับตัว Main UI วันนี้ก็เลยทำเป็นบทความ อธิบาย AsyncTask วิธีการใช้งาน AsyncTask หลีกเลี่ยงการเกิด Exception เมื่อติดต่อผ่าน HTTP โดยใช้ AsyncTask แทน โดยบทความนี้จะโฟกัสไปที่การเชื่อมต่อ Internet โดยใช้ AsyncTask เพื่อหลีกเลี่ยง OnMainThreadException ครับ AsyncTask คืออะไร?

Android กับการใช้งาน AsyncTask

Android SeekBar Control MediaPlayer Progress. Android Webservice example. In this post, we will be discussing how to invoke web service from Android application.

Android Webservice example

When web methods are invoked from inside Android application, the application gets back the data from the server in the form of XML. The response which has been received can be parsed and rendered in the application as needed. If you are looking for tutorial on consuming the web service which you created using Java or Dot Net, please follow below links: Restful Webservice Call And Get And Parse JSON Data- Android Example. Scheduling Background Tasks in Android. Periodically your Android application might need to perform a task, such as checking a server for updates.

Scheduling Background Tasks in Android

The AlarmManager class can be used to schedule and execute operations that need to occur even if the application isn’t running. The AlarmManager class enables the scheduling of repeated alarms that will run at set points in the future. The AlarmManager is given a PendingIntent to fire whenever an alarm is scheduled. When an alarm is triggered, the registered Intent is broadcast by the Android system, starting the target application if it’s not already running. Alarm Type and Precision There are two major alarm types, Elapsed Realtime and Real Time Clock. ELAPSED_REALTIME – Fires the pending intent after the specified length of time since device boot. Android - How to Pass Array to another activity.

Android Tab Layout with Swipeable Views. My previous article explains about Android Tab Layout and it got very good ranking in search engines. But unfortunately TabHost is deprecated by android in favor of fragments. So it is suggested that use fragment to achieve tab layout. This article shows you how to create tab layout using fragments and viewpager. Also you can swipe between tab view as it is the functionality of viewpager which is not possible when using TabHost. Display the current time and date in an Android application.

Dialog box

How to play an android notification sound. Better User Interfaces with the Android Action Bar. The action bar is an important design element, usually at the top of each screen in an app, that provides a consistent familiar look between Android apps. It is used to provide better user interaction and experience by supporting easy navigation through tabs and drop-down lists. It also provides a space for the app or activity’s identity, thus enabling the user to know their location in the app, and easy access to the actions that can be performed. Input text dialog Android.

Input text dialog Android. Android Drawables - Widgets. Android - How to use EditText onTextChanged event when i press the number. Using lists in Android (ListView) By default a ListView has no selection mode active. You can activate it via the setChoiceMode() method call. Pass ListView.CHOICE_MODE_MULTIPLE for multiple selections or ListView.CHOICE_MODE_SINGLE for single selections to this method. To get the selected items of a ListView, use the getCheckedItemPosition() for a single selection method or listView.getCheckedItemPositions() for multiple selections.

If you have stable ID, you could also use the getCheckedItemIds() method to get the selected IDs. Android SQLite Database Tutorial. Java - Converting Integer to String with comma for thousands. การติดตั้ง android Studio บน Windows 7. หลังจากที่ เราได้ทำการติดตั้ง JDK และ กำหนด path ไปเป็นที่เรียบร้อย ( ใครไม่ได้ทำ ไปดูที่นี่ ) มาวันนี้เราจะติดตั้ง android Studio กัน. ทุกๆเรื่อง ที่เกี่ยวกับ android โดย มาสเตอร์ อึ่ง. สถิติ - KMCellCount - Google Play Developer Console. Android Fragments Example. A Fragment represents a portion of a user interface or an operation that runs within an Activity. A single activity can contain multiple fragments and many fragments can be reused in many, different activities. It is not wrong if we say that a fragment is a type of sub-activity that can be utilized again in multiple activities. Although each fragment has each own lifecycle, it is connected with the Activity it belongs to, so it’s lifecycle is directly influenced by the activity’s lifecycle.

Multi-pane development in Android with Fragments. The following tutorial demonstrates how to use fragments in a standard Android application without using the support library. The application uses layouts with different fragments depending on portrait and landscape mode. In portrait mode the RssfeedActivity shows one fragment.

Multi-pane development in Android with Fragments.

Gps