Functions and notes of Android getresources

Today, I am working on an android File Manager, which uses getresources in many places. Drawable currenticon = NULL; currenticon = getresources (). getdrawable (R. drawable. folder); currenticon = getresources (). getdrawable (R. drawable.

Android title bar settings

1. Hide the title barRequestwindowfeature (window. feature_no_title ); 2. display the progress bar on the title barRequestwindowfeature (window. feature_progress );Setcontentview (R. layout. progressbar_1 );Setprogressbarvisibility (true ); Final

Android built-in themes

Theme of Android •Android: theme = "@ Android: style/theme. Dialog"Display an activity as a dialog box •Android: theme = "@ Android: style/theme. notitlebar"Do not show applicationsProgramTitle Bar •Android: theme = "@ Android: style/theme.

Android code implements the indictor Effect of viewpager

Today, I am bored. I wrote an indicator that imitates viewpager. This example uses the example of an article I wrote earlier to improve 《Android horizontal scrolling Screen Effect Analysis. Next, let's talk about my ideas. First, when the control is

Android code snippets (3)

The first two have already reached 40th, so I have to write another article for record. previous articles: Android useful code snippets (II) and Android useful code snippets, if you need it, you can check it out. If this article is useful to you,

Android compilation tool ant

AntIs a Java-based build tool, similar to make in (UNIX) C. Unlike the extension mode based on shell commands, ant extends with Java classes, you do not have to write shell commands. Ant is a process script engine used to automatically call programs

Socket Communication for Android

The Mid-Autumn Festival is about to take place. 7 + 3 = 8 is a little sad and has been decadent. I haven't updated my blog in the past two months, and I don't know how to write it, I don't know what to write. In a recent small project, socket

How to Prevent Android apps from being decompiled

As an Android app developer, you have to face an embarrassing situation: applications that have worked hard to develop can be decompiled easily by others. Google also seems to have discovered this problem. From sdk2.3, we can see that a proguard

Dynamically Retrieve the Control ID in Android

Sometimes we need to dynamically obtain the ID of a control and then perform the operation. After searching online, we found the method getresources (). getidentifier ("textview01", "ID", "CN. xxx. XXX "); The first parameter is the ID name, the

Android intercepts SMS messages and blocks system notifications

There are several key points to intercept text messages:   1. Android receives text messages in broadcast mode. 2. You only need to add the "receive" SMS permission to your manifest. xml file.View plainprint?   3. Write a broadcast receiving

Technical Level of Android Development

The technical staff of any mobile development ecosystem are distributed in a pyramid. That is to say, most people are developers, and only a few of them are real programmers. The same is true for Android systems. Among the large groups of Android

Android code snippets

Sometimes, you need some small functions. After finding them, you can post them to your blog and leave a message. It is inconvenient to find them. So you can sort them out to help yourself and others. 1. Obtain the System Version Number: PackageInfo

Context and global variable analysis in Android

When studying context today, I have a certain understanding of application and activity context. The following documents are copied from the Internet, Differences between application context and activity context: These are two different contexts and

Android control dragging implementation

This is also the Code obtained from the Internet. The example is relatively simple, but if you need this function, this example can provide a lot of prompts. First, give This is the effect after dragging. An imageview and a button control provide

Android custom view attributes (ATTS. XML, typedarray) Learning

I recently encountered this problem in the learning process. I don't know why typedarray is used? Go to the official website and check out: typedarray inherits from the object class. Then, let's take a look at its class overview: Container for an

Android-launcher Startup Process Analysis

Step 1: Start With launcherapplication. Java and find the oncreate () method first: Public void oncreate () {// set the minimum heap memory to 8 m vmruntime. getruntime (). setminimumheapsize (8*1024*1024); // LLX modify the heapsize super.

Android floating window-Get memory

First of all, it must be noted that this example is not written by me. It is shown in a post on eoeandroid that downloads the source code and analyzes it for learning and sharing. (In addition, the Code has been modified to better illustrate the

[Android] asynchronously loading images-Good idea

Import Java. io. file; import Java. io. fileinputstream; import Java. io. filenotfoundexception; import Java. io. fileoutputstream; import Java. io. inputstream; import Java. io. outputstream; import java.net. URL; import Java. util. hashmap; import

Optimization of listview asynchronous image loading (Android)

Optimization of listview asynchronous loading There are many examples on the Internet about asynchronous loading of listview. The overall idea is similar, but many versions may have bugs or performance problems to be optimized. In view of this, I

Enable Native service in Android to use binder to communicate with Applications

The upper-layer Android applications call the native service through the Binder Mechanism. The figure below mainly describes the basic class diagrams when we implement the BP and Bn related to the binder. The basic description is how to use

Total Pages: 2774 1 .... 1677 1678 1679 1680 1681 .... 2774 Go to: GO

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.