Показаны сообщения с ярлыком java. Показать все сообщения
Показаны сообщения с ярлыком java. Показать все сообщения

Recommendations to the style code

The rules of the Java language

We follow standard conventions for the design of code in Java. We have added to them some of the rules:
  1. Exceptions: never steal and do not ignore them without explanation.
  2. Exceptions: Do not use generic exceptions, but the code in the libraries at the root of the stack.
  3. Finalizers do not use them.
  4. Imports: fully qualify the imports.

Write your first application on Android


Preface


The purpose of this post - on the one hand to share their successful experience in start developing applications for the Android platform and on the other hand contribute to the development of the market of software for this remarkable and rapidly growing platform for the account (without false modesty, I say) you may have read this post. The network, of course, you can find information on application development, "a little more complicated than helloworld», but as a rule they scattered and they do not describe the various small underwater stones. In this post we look at the full cycle of application development, starting with a clean computer to finished apk-file.Under the cut screens.

Android, the history of the first application

         Preface
Good day. I hasten to note that this post does not pull or how much a benefit, it's only a story of a beginner, novice, telling about the beginning of my conquest of the android. Let's begin.

The idea to write his first in the life of an application for android appeared spontaneously. Basic knowledge of java were available, and in my head immediately got the idea to write a program to send SMS through serviceorangetext.md (yes, this is the Republic of Moldova). This proved harder than I thought at first glance.

Android. Working with a status line.

image
The article tells about how to deal with the status bar in Android. This article is intended for beginners only studying for the Android platform under development. Also worth noting that the status bar is more used to notify the user of any events occurring in a system that unites its target with pop-up notifications Toast. On Habrahabr already has a fairly complete article on using Toast, and this post only develops the theme of the notifications.

The text itself was written articles for the sandbox, and in fact Hello world as it is. Now I'm interested in wondering whether anyone at all, or a direction, or it's not worth it.

Using Android Search Dialog. A simple application (part 1)

image

This article is for those who have already written the HelloWorld for Android, and know what the Activity and Intent, as well as where there is manifest, and why you need layout'y. Otherwise, you acquainted with this material, for example, developer.android.com .

The article describes how to create a simple application that uses a mechanism to implement the search capabilities built based on the framework. After reading, you can also configure your application so that it searches through the data using a standard Android Search Dialog.

10 useful solutions for the Android Developer

Content
  1. Entry
  2. About the adapters list ( ListView ) with subcategories (for grouping items in the list)
  3. About the lists that contain any of the (list items do anything complicated or alter themselves for selection)
  4. About forced invalidation of the lists
  5. About caching images for ListView (for lists with images)
  6. About adapters, iterates through the cursor (to support pagination on the list)
  7. About authorization via OAuth to Android
  8. About using MediaPlayer and bufferring video feed over HTTP
  9. About the turn of a few AsyncTask (alternate to perform background tasks)
  10. About changing illumination of the selected item in ListView
  11. About adding QuickActions in project
  12. Three more small solving

Android Calendar API

This article focuses on the use of undocumented API to work with standard calendar Android. 
For what?! 

Android dialog box with icons in the menu

The idea was conceived Insanely simple and I would even say stupid. And when I startedto do something here that I wanted to do dramatically beautiful dialog box by selecting themenu icons. Such a dialogue is present in the standard Android, for example, a long tapon the desktop opens the dialog to add content (widget oboiny, etc.). So, welcome to acat ...


As mentioned above, in front of me was to make a dialog box like this:



User notification: Toast

Hi!
I'm begining a series of articles about how to alert the user. Course is designed for beginners.There are three ways to alert the user: Toast, Notification and through different types of Dialog. Today I will discuss of the first type of warning - Toast.
Introduction
Toast is a pop-up window that allows you to quickly notify the user about the event has occurred, such as maintaining the program settings to SD-card. Toast feature is that during the message, the user can interact with them is behind Activity, or with a home screen (home screen). Also worth noting that the user can not control the closing of Toast with hardware Back button or other possible means, the message appears and then smoothly itself as smoothly disappears. The time delay between the appearance and disappearance can be set programmatically. In most cases, Toast is a short message, but there is an opportunity to ask any appearance of Toast, for example, add an image next to the text. In addition, you can control the location of Toast on the screen.Toast can be created from an Activity, or from the Service. In the case of a service Toast appears on top of Activity, which has the focus, or top of the home screen.

Android Development Demo: “DialANumber” – How to write your own very first Android program – Made Simple!


While I think the Android development examples are not really good and straight forward perhaps some of you come along with them. However, I would like to provide you a very very simple example here on how to write your own first Android program.
This is technically very easy.