Android學習路徑(四)檔案項目學習的名單,android顯示單元經常使用的

來源:互聯網
上載者:User

標籤:

1.的該專案檔所謂名單AndroidManifest.xml檔案。該檔案,但有很大的利用,例:app名字。表徵圖,app支援的版本app等等。以下我就介紹下這個資訊清單檔的各個參數的作用。

<manifest xmlns:android="http://schemas.android.com/apk/res/android"命名空間  package="com.example.hello"包名唯一標示一個應用android:versionCode="1"版本號碼號    android:versionName="1.0"版本號碼名稱   android:icon="@drawable/ic_launcher"應用表徵圖。

訪問R.java檔案的drawable的常量,使用這個常量下的icon的ic_launcher作為應用的表徵圖 android:label="@string/app_name"應用程式名稱 <activity一個應用中是有多個activity的。

一個activity代表一個表單 android:name="com.example.hello.MainActivity"這個包com.example.hello下的MainActivity android:label="@string/app_name" >activity表單的標題 <intent-filter>意圖過濾器專門匹配意圖。對資料進行過濾 <action android:name="android.intent.action.MAIN" />動作名稱 <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> android:minSdkVersion="8"指定應用支援的最低的版本號碼 android:targetSdkVersion="19" />最高的版本號碼

2.android中的顯示單位

1..px(像素)一般的HVGA代表320*480像素。這個用的比較多
2..dip或者dp(裝置獨立像素),這個和裝置硬體有關了。一般為了支援WVGA,QVGA和HVGA推薦使用這個,不依賴像素
3..sp(像素的比例)主要處理的字型大小,基於自適應系統字型。


在除了上述3外。也有幾個不常用的。in(腳),mm(毫米),pt(點)1/72寸
為了適應不同的解析度,不同的像素密度,推薦使用dip。使用文本sp、



  

Android學習路徑(四)檔案項目學習的名單,android顯示單元經常使用的

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.