Android journey 1@ 인코딩 스타일 및 이름 지정 사양
/*
* 1. : , ,
* , ,
* 。 , “ ” ,
* , , “ ”, ,
* , , , 。 :
*/
/*
* 1) Project :( )
* #.Requirement Doc: project
* #.Design:
* #.Planning&Log: 、 、
* #.Test:
* #.Study: demo
* #.Deployment: ,
* #.src:
* #.help:
* #. ...( )
* : IDE project , (java), , 3 , :【 】.【 】.【 】
*/
/*
* 2) :
* #、Pascal : , , “ActivityDemo”, : , ,
* #、Camel : , pascal , “myName”, : ( ),
* #、 ( , ): , “int intMyAge;”
* #、 : ( ) ,
* : :“mMyName”; :“sMyName”; :“pMyName”;
* , ,
*/
/*
* 3) :
* 1、 35
* 2、
* 3、final String String,
* 4、 return
* 5、 set(),get()
* 6、 ,
* 7、 class ,
* 8、switch default
* 9、 import
* ...
*
*/
// Android :
/*
* Copyright (C) 2006 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.app;
import com.android.internal.app.ActionBarImpl;
import com.android.internal.policy.PolicyManager;
import android.os.Build;
import android.os.Bundle;
import android.os.UserHandle;
import android.text.Selection;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
import android.text.method.TextKeyListener;
import android.util.AttributeSet;
import android.util.EventLog;
/** HTML , javadoc
* An activity is a single, focused thing that the user can do. Almost all
* activities interact with the user, so the Activity class takes care of
* creating a window for you in which you can place your UI with
* {@link #setContentView}. While activities are often presented to the user
* as full-screen windows, they can also be used in other ways: as floating
* windows (via a theme with {@link android.R.attr#windowIsFloating} set)
* or embedded inside of another activity (using {@link ActivityGroup}).
*
* There are two methods almost all subclasses of Activity will implement:
*
*
* - {@link #onCreate} is where you initialize your activity. Most
* importantly, here you will usually call {@link #setContentView(int)}
* with a layout resource defining your UI, and using {@link #findViewById}
* to retrieve the widgets in that UI that you need to interact with
* programmatically.
*
*
- {@link #onPause} is where you deal with the user leaving your
* activity. Most importantly, any changes made by the user should at this
* point be committed (usually to the
* {@link android.content.ContentProvider} holding the data).
*
...
*/
public class Activity extends ContextThemeWrapper
implements LayoutInflater.Factory2,
Window.Callback, KeyEvent.Callback,
OnCreateContextMenuListener, ComponentCallbacks2 {
private static final String TAG = "Activity";
private static final boolean DEBUG_LIFECYCLE = false;
/** Standard activity result: operation canceled. */
//
public static final int RESULT_CANCELED = 0;
/** Standard activity result: operation succeeded. */
public static final int RESULT_OK = -1;
/** Start of user-defined activity results. */
public static final int RESULT_FIRST_USER = 1;
static final String FRAGMENTS_TAG = "android:fragments";
private static final String WINDOW_HIERARCHY_TAG = "android:viewHierarchyState";
private static final String SAVED_DIALOG_IDS_KEY = "android:savedDialogIds";
private static final String SAVED_DIALOGS_TAG = "android:savedDialogs";
private static final String SAVED_DIALOG_KEY_PREFIX = "android:dialog_";
private static final String SAVED_DIALOG_ARGS_KEY_PREFIX = "android:dialog_args_";
private static class ManagedDialog {
Dialog mDialog;
Bundle mArgs;
}
private SparseArray mManagedDialogs;
// set by the thread after the constructor and before onCreate(Bundle savedInstanceState) is called.
//
private Instrumentation mInstrumentation;
private IBinder mToken;
private int mIdent;
static final class NonConfigurationInstances {
Object activity;
HashMap children;
ArrayList fragments;
HashMap loaders;
}
/* package */ NonConfigurationInstances mLastNonConfigurationInstances;
private Window mWindow;
/**
* Change the intent returned by {@link #getIntent}. This holds a
* reference to the given intent; it does not copy it. Often used in
* conjunction with {@link #onNewIntent}.
*
* @param newIntent The new Intent object to return from getIntent
*
* @see #getIntent
* @see #onNewIntent
* javadoc
*@author ..
*@date ..
*@modify ..(who,when..)
*/
public void setIntent(Intent newIntent) {
mIntent = newIntent;
}
전재 대상:https://www.cnblogs.com/allenpengyu/p/3495156.html
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.