android+notepad教程,Android Sample學習——NotePad

android.view.Menu專場

Interface for managing the items in a menu.

By default, every Activity supports an options menu of actions or options. You can add items to this menu and handle clicks on your additions. The easiest way of adding menu items is inflating an XML file into the

Different menu types support different features:

Context menus: Do not support item shortcuts and item icons.

Options menus: The icon menus do not support item check marks and only show the item's expanded menus (only available if six or more menu items are visible, reached via the 'More' item in the icon menu) do not show item icons, and item check marks are discouraged.

Sub menus: Do not support item icons, or nested sub menus.

public abstract MenuItemadd (int groupId, int itemId, int order, int titleRes)

Variation on

Parameters

groupId

The group identifier that this item should be part of. This can also be used to define groups of items for batch state changes. Normally use

itemId

Unique item ID. Use

order

The order for the item. Use

titleRes

Resource identifier of title string.

Returns

The newly added menu item.

public abstract MenuItemsetShortcut (char numericChar, char alphaChar)

Change both the numeric and alphabetic shortcut associated with this item. Note that the shortcut will be triggered when the key that generates the given character is pressed alone or along with with the alt key. Also note that case is not significant and that alphabetic shortcut characters will be displayed in lower case.

See

Parameters

numericChar

The numeric shortcut key. This is the shortcut when using a numeric (e.g., 12-key) keyboard.

alphaChar

The alphabetic shortcut key. This is the shortcut when using a keyboard with alphabetic keys.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

android.graphics.Rect

Rect holds four integer coordinates for a rectangle. The rectangle is represented by the coordinates of its 4 edges (left, top, right bottom). These fields can be accessed directly. Use width() and height() to retrieve the rectangle's width and height. Note: most methods do not check to see that the coordinates are sorted correctly (i.e. left <= right and top <= bottom).

android.graphics.Paint

The Paint class holds the style and color information about how to draw geometries, text and bitmaps.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

android.content.Intent專題:

Uri android.content.Intent.getData()

public UrigetData ()

Retrieve data this intent is operating on. This URI specifies the name of the data; often it uses the content: scheme, specifying data in a content provider. Other schemes may be handled by specific activities, such as http: by the web browser.

Returns

The URI of the data this intent is targeting or null.

public IntentsetData (Uri data)

Set the data this intent is operating on. This method automatically clears any type that was previously set by

Note: scheme and host name matching in the Android framework is case-sensitive, unlike the formal RFC. As a result, you should always ensure that you write your Uri with these elements using lower case letters, and normalize any Uris you receive from outside of Android to ensure the scheme and host is lower case.

Parameters

data

The URI of the data this intent is now targeting.

Returns

Returns the same Intent object, for chaining multiple calls into a single statement.

public static final StringACTION_INSERT

Activity Action: Insert an empty item into the given container.

Input:

Output: URI of the new data that was created.

Constant Value:"android.intent.action.INSERT"

public IntentsetAction (String action)

Set the general action to be performed.

Parameters

action

An action name, such as ACTION_VIEW. Application-specific actions should be prefixed with the vendor's package name.

Returns

Returns the same Intent object, for chaining multiple calls into a single statement.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~·

android.app.Activity專場:

void android.app.Activity.finish()

public voidfinish ()

Call this when your activity is done and should be closed. The ActivityResult is propagated back to whoever launched you via onActivityResult().

public final voidsetResult (int resultCode, Intent data)

Call this to set the result that your activity will return to its caller.

Parameters

resultCode

The result code to propagate back to the originating activity, often RESULT_CANCELED or RESULT_OK

data

The data to propagate back to the originating activity.

public voidsetContentView (int layoutResID)

Set the activity content from a layout resource. The resource will be inflated, adding all top-level views to the activity.

Parameters

layoutResID

Resource ID to be inflated.

public final CursormanagedQuery (Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)

Wrapper around

Parameters

uri

The URI of the content provider to query.

projection

List of columns to return.

selection

SQL WHERE clause.

selectionArgs

The arguments to selection, if any ?s are pesent

sortOrder

SQL ORDER BY clause.

Returns

The Cursor that was returned by query().

public voidsetTitle

Change the title associated with this activity. If this is a top-level activity, the title for its window will change. If it is an embedded activity, the parent can do whatever it wants with it.

public booleanonOptionsItemSelected

This hook is called whenever an item in your options menu is selected. The default implementation simply returns false to have the normal processing happen (calling the item's Runnable or sending a message to its Handler as appropriate). You can use this method for any items for which you would like to do processing without those other facilities.

Derived classes should call through to the base class for it to perform the default menu handling.

Parameters

item

The menu item that was selected.

Returns

boolean Return false to allow normal menu processing to proceed, true to consume it here.

public IntentgetIntent ()

Return the intent that started this activity.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~·

android.widget.TextView專場:

public final voidsetTextKeepState

Like

Parameters

text

The new text to place in the text view.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

android.database.Cursor專場:

String android.database.Cursor.getString(int columnIndex)

public abstract StringgetString (int columnIndex)

Returns the value of the requested column as a String.

If the native content of that column is not text the result will be the result of passing the column value to String.valueOf(x).

Parameters

columnIndex

the zero-based index of the target column.

Returns

the value of that column as a String.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

android.content.ContentValues專題:

void android.content.ContentValues.put(String key, String value)

public voidput

Adds a value to the set.

Parameters

key

the name of the value to put

value

the data for the value to put

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/278873.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/278873.shtml
英文地址,請注明出處:http://en.pswp.cn/news/278873.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Windows應用程序開發

Windows窗體應用程序開發&#xff1a;WinForm、桌面應用程序&#xff0c;有可執行文件(.exe)即安裝包。是一種C/S&#xff08;客戶機/服務器&#xff09;架構應用程序 1.Windows窗體應用程序&#xff0c;用可視化的窗體和控件生成豐富界面的&#xff0c;可交互操作的應用程序。…

獲取outlook 會議_如何僅在Microsoft Outlook中僅獲取您關注的電子郵件的通知

獲取outlook 會議Some emails are more important than others. Rather than getting alerts every time an email arrives, configure Microsoft Outlook to only alert you when the important stuff hits your inbox, rather than any old email that can wait until you ch…

jq html 多一個引號,為什么jQuery模板會為某些字符串添加雙引號

背景我正在使用jQuery模板,ASP.Net MVC Razor視圖和Twitter.問題使用帶有一些字符串的jQuery模板會自動導致這些字符串被包含在“細節我創建了一個如下所示的jQuery模板&#xff1a;before ${text.parseUserName().parseHashTag()} after${created_at}${prettyDate(created_at)…

從Windows計算機上完全刪除iTunes和其他Apple軟件

If you are giving up on iTunes for another music player, uninstalling it completely can be a hassle. Here we show you how to completely remove all traces of it including QuickTime, iTunes Helper, Bonjour…all of it. 如果您在iTunes上放棄了其他音樂播放器&…

html仿微信滑動刪除,使用Vue實現移動端左滑刪除效果附源碼

左滑刪除在移動端是很常見的一種操作&#xff0c;常見于刪除購物車中的商品&#xff0c;刪除收藏夾中文章等等場景。我們只需要手指按住要刪除的對象&#xff0c;然后輕輕向左滑動&#xff0c;便會出現刪除按鈕&#xff0c;然后點擊刪除按鈕即可刪除對象。點擊下載源碼今天我給…

推薦書本_

1. c#_設計模式 《設計模式&#xff1a;可復用面向對象軟件的基礎》GoF 《面向對象分析與設計》Grady Booch 《敏捷軟件開發&#xff1a;原則、模式與實踐》 Robert C.Martin 《重構&#xff1a;改善既有代碼的設計》 Martin Fowler 《Refactoring to Patterns》Jshua Kerievsk…

h5 領取優惠券 下載_下載7天免費試用版或購買VideoProc,可享受60%優惠券[贊助的帖子]...

h5 領取優惠券 下載You may have seen piles of video editing tools, but here we’ll show you a different one – VideoProc, developed by Digiarty Software, Inc. It is not a “standard” video editing program. Some consider VideoProc a complete toolbox also fo…

html走馬觀花效果,走馬觀花臺灣行 用EF-S 10-18來記錄風景

我在6月初入手無忌第一支10-18&#xff0c;初步測試后對其表現比較滿意&#xff0c;具體可看http://forum.xitek.com/thread-1314865-1-1-1.html。7月初到8月中旬我都處于旅行狀態中&#xff0c;佳能系統帶了三支鏡&#xff0c;包括EFS10-18&#xff0c;EFS55-250和EF24IS&…

一大波學習內容!

Dubbo-大波-服務化框架 dubbo_百度搜索Dubbo與Zookeeper、SpringMVC整合和使用&#xff08;負載均衡、容錯&#xff09; - 好庫文摘User Guide-zh - Dubbo - Alibaba Open SesameUser Guide-zh - Dubbo - Alibaba Open Sesame簡單之美 | Dubbo架構設計詳解DUBBOHprose RPC框架 …

文件下載至storage_如何防止Storage Sense在Windows 10上刪除下載的文件

文件下載至storageStorage Sense is the Disk Cleanup replacement for the modern world. It frees up space on your computer by deleting things like recycle bin contents, temporary internet files, and app temporary files. This also includes the Downloads folder…

html標簽屬性和標簽事件,HTML參考手冊( 標簽、屬性和事件)

HTML標簽標簽 描述 DTD定義注釋。 STF定義文檔類型。 STF定義錨。 STF定義縮寫。 STF定義只取首字母的縮寫。 STF定義文檔作者或擁有者的聯系信息。 STF 不贊成使用。定義嵌入的 applet。 TF 定義圖像映射內部的區域。 STF 定義粗體字。 STF 定義頁面中所有鏈接的默認地址或默認…

Feign從配置文件中讀取url

Feign的url和name都是可配置的&#xff0c;就是從配置文件中讀取的屬性值&#xff0c;然后用占位符引用就可以了&#xff1a; ${rpc.url} FeignClient(name "me",url "${rpc.url}", // 這里是可以配置的, 就不用再硬編碼了fallbackFactory MyHystrixFa…

百度地圖精確定位html,HTML5地理定位,百度地圖API,知識點熟悉

深入seajs源碼系列三入口方法 每個程序都有個入口方法,類似于c的main函數,seajs也不例外.系列一的demo在首頁使用了seajs.use(),這便是入口方法.入口方法可以接受2個參數,第一個參數為模塊名稱,第二個 ...javscript創建Emitter本文簡單敘述下javascript是如何建立一個Emitter構…

如何搭建html運行環境,搭建真實的運行環境2019.4.22

1、搭建真實運行環境步驟①先下載phpstudy軟件②按照安裝步驟進行phpstudy安裝&#xff0c;安裝后啟動服務&#xff0c;點擊《其它選項菜單》里面的《My HomePage》選項&#xff0c;正常顯示&#xff0c;說明安裝成功2、創建本地訪問目錄和域名①打開phpstudy&#xff0c;點擊《…

supervisord的安裝使用

由于生產環境使用的的tomcat&#xff0c;項目比較重要&#xff0c;所以要做進程守護&#xff0c;本來打算自己寫腳本&#xff0c;但是效果不理想&#xff0c;想了下還是用supervisord了 由于很久不用&#xff0c;所以寫下來部署步驟 第一&#xff1a;安裝&#xff0c;安裝的方法…

如何在Windows 10上使用Microsoft Defender掃描文件或文件夾中的惡意軟件

On Windows 10, Microsoft Defender (formerly called “Windows Defender”) always scans files before you open them unless you’ve installed a third-party antivirus. You can also perform a quick scan of any file or folder, too. Here’s how. 在Windows 10上&…

html中怎么獲取搜索框中的值,百度API 搜索框,獲取相應的地點的uid

在百度API的輸入框中怎么根據搜索到的地址獲取百度的uidbody, html{width: 100%;height: 100%;margin:0;font-family:"微軟雅黑";font-size:14px;}#l-map{height:300px;width:100%;}#r-result{width:100%;}關鍵字輸入提示詞條請輸入:// 百度地圖API功能function G(id…

adb 常用

adb抓日志命令&#xff1a;adb pull /data/log/android_logs 本地目錄 構造大文件&#xff1a;adb shell dd if/dev/zero of/mnt/sdcard/bigfile adb shell pm list package 查看所有包 adb shell pm path packageName 查看包名路徑 adb uninstall packageName 卸載應用 …

html 替代table,Iframe的缺點,div或者table成為替代者

1、在網頁中使用框架結構最大的弊病是搜索引擎的“蜘蛛”程序無法解讀這種頁面。當“蜘蛛”程序遇到由數個框架組成的網頁時&#xff0c;它們只看到框架而無法找到鏈接&#xff0c;因此它們會以為該網站是個死站點&#xff0c;并且很快轉身離去。對一個網站來說這無異于一場災難…

uac2.0驅動_關閉Vista中令人討厭的HP驅動程序UAC彈出更新檢查

uac2.0驅動If you are using Vista and have an HP printer, especially of the All-In-One variety, you’ve probably noticed that once a week or so you get this obnoxious User Account Control popup dialog out of the blue asking for permission to run some Hewlet…