The Live Folder ActivityThe Live Folder is defined using an Intent ret dịch - The Live Folder ActivityThe Live Folder is defined using an Intent ret Việt làm thế nào để nói

The Live Folder ActivityThe Live Fo

The Live Folder Activity
The Live Folder is defined using an Intent returned as the result of an Activity (typically from within the onCreate handler).
Use the Intent’s setData method to specify the URI of the Content Provider supplying the data (with the appropriate projection applied), as described in the previous section.
You can configure the Intent further by using a series of extras as follows:
^ LiveFolders.EXTRA_LIVE_FOLDER_DISPLAY_MODE — Specifies the display mode to use.
This can be either LiveFolders.DISPLAY_MODE_LIST or LiveFolders.DISPLAY_MODE_ GRID to display your Live Folder as a list or grid, respectively.
^ LiveFolders.EXTRA_LIVE_FOLDER_ICON — Provides a Drawable resource that will be used as the home screen icon that represents the Live Folder when it hasn’t been opened.
^ LiveFolders.EXTRA_LIVE_FOLDER_NAME — Provides a descriptive name to use with the icon described above to represent the Live Folder on the home screen when it hasn’t been opened.
Listing 14-30 shows the overridden onCreate method of an Activity used to create a Live Folder. After the Live Folder definition Intent is constructed, it is set as the Activity result using setResult, and the Activity is closed with a call to finish.
// Return the Live Folder Intent as a result. setResult(RESULT_OK, intent);
}
else
setResult(RESULT_CANCELED);
finish();
}
code snippet PA4AD_Ch14_MyLiveFolder/src/MyLiveFolder.java
You can also provide support for selecting items in the Live Folder.
By adding a LiveFolders.EXTRA_LlVE_FOLDER_BASE_lNTENT extra to the returned Intent, you can specify a base Intent to fire when a Live Folder item is selected. When this value is set, selecting a Live Folder item will result in startActivity being called with the specified base Intent used as the Intent parameter.
Best practice (as shown in Listing 14-31) is to set the data parameter of this Intent to the base URI of the Content Provider that’s supplying the Live Folder’s data. In such cases the Live Folder will automatically append the value stored in the selected item’s _id column to the Intent’s data value.
0/5000
Từ: -
Sang: -
Kết quả (Việt) 1: [Sao chép]
Sao chép!
The Live Folder ActivityThe Live Folder is defined using an Intent returned as the result of an Activity (typically from within the onCreate handler).Use the Intent’s setData method to specify the URI of the Content Provider supplying the data (with the appropriate projection applied), as described in the previous section.You can configure the Intent further by using a series of extras as follows:^ LiveFolders.EXTRA_LIVE_FOLDER_DISPLAY_MODE — Specifies the display mode to use.This can be either LiveFolders.DISPLAY_MODE_LIST or LiveFolders.DISPLAY_MODE_ GRID to display your Live Folder as a list or grid, respectively.^ LiveFolders.EXTRA_LIVE_FOLDER_ICON — Provides a Drawable resource that will be used as the home screen icon that represents the Live Folder when it hasn’t been opened.^ LiveFolders.EXTRA_LIVE_FOLDER_NAME — Provides a descriptive name to use with the icon described above to represent the Live Folder on the home screen when it hasn’t been opened.Listing 14-30 shows the overridden onCreate method of an Activity used to create a Live Folder. After the Live Folder definition Intent is constructed, it is set as the Activity result using setResult, and the Activity is closed with a call to finish.// Return the Live Folder Intent as a result. setResult(RESULT_OK, intent);}elsesetResult(RESULT_CANCELED);finish();}code snippet PA4AD_Ch14_MyLiveFolder/src/MyLiveFolder.javaYou can also provide support for selecting items in the Live Folder.By adding a LiveFolders.EXTRA_LlVE_FOLDER_BASE_lNTENT extra to the returned Intent, you can specify a base Intent to fire when a Live Folder item is selected. When this value is set, selecting a Live Folder item will result in startActivity being called with the specified base Intent used as the Intent parameter.Best practice (as shown in Listing 14-31) is to set the data parameter of this Intent to the base URI of the Content Provider that’s supplying the Live Folder’s data. In such cases the Live Folder will automatically append the value stored in the selected item’s _id column to the Intent’s data value.
đang được dịch, vui lòng đợi..
Kết quả (Việt) 2:[Sao chép]
Sao chép!
Live Thư mục Hoạt động
các thư mục Live được định nghĩa bằng một Intent trả lại như là kết quả của một hoạt động (thông thường là từ bên trong xử lý onCreate).
Sử dụng phương pháp SetData của Ý định để xác định URI của các nhà cung cấp nội dung cung cấp các dữ liệu (với chiếu thích hợp áp dụng .), như mô tả trong phần trước
Bạn có thể cấu hình Ý định hơn nữa bằng cách sử dụng một loạt các tính năng bổ sung như sau:
. ^ LiveFolders.EXTRA_LIVE_FOLDER_DISPLAY_MODE - Chỉ định các chế độ hiển thị sử dụng
này có thể là LiveFolders.DISPLAY_MODE_LIST hoặc LiveFolders.DISPLAY_MODE_ GRID để hiển thị Thư mục Live của bạn như là một danh sách hoặc lưới, tương ứng.
^ LiveFolders.EXTRA_LIVE_FOLDER_ICON - Cung cấp một nguồn tài nguyên có thể vẽ được sẽ được sử dụng như là biểu tượng màn hình chủ, đại diện cho thư mục trực tiếp khi nó chưa được mở.
^ LiveFolders.EXTRA_LIVE_FOLDER_NAME - Cung cấp một mô tả tên để sử dụng với các biểu tượng mô tả ở trên để đại diện cho các thư mục trực tiếp trên màn hình chủ khi nó chưa được mở.
Liệt 14-30 cho thấy các ghi đè onCreate phương pháp của một Hoạt động sử dụng để tạo ra một thư mục Live. Sau Live Ý định nghĩa thư mục được xây dựng, nó được thiết lập như là kết quả Hoạt động sử dụng setResult, và các Hoạt động được đóng lại với một cuộc gọi để kết thúc.
// Return Folder Ý định Live như là một kết quả. setResult (RESULT_OK, mục đích);
}
khác
setResult (RESULT_CANCELED);
kết thúc ();
}
đoạn mã PA4AD_Ch14_MyLiveFolder / src / MyLiveFolder.java
Bạn cũng có thể cung cấp hỗ trợ cho việc lựa chọn các mục trong Folder Live.
Bằng cách thêm một LiveFolders.EXTRA_LlVE_FOLDER_BASE_lNTENT bổ sung cho các Ý định trở lại, bạn có thể chỉ định một Ý định cơ sở để bắn khi một mục Sống Thư mục được chọn. Khi giá trị này được thiết lập, chọn một thư mục mục Live sẽ dẫn đến startActivity được gọi với Ý định cơ sở quy định sử dụng như các tham số Intent.
Thực hành tốt nhất (như thể hiện trong Liệt kê 14-31) là để thiết lập các thông số dữ liệu của Ý định này để các cơ sở URI của các nhà cung cấp nội dung đó là cung cấp dữ liệu Live Thư mục của. Trong những trường hợp như Live thư mục sẽ tự động thêm các giá trị được lưu trữ trong cột _id của mục được chọn để giá trị dữ liệu của Intent.
đang được dịch, vui lòng đợi..
 
Các ngôn ngữ khác
Hỗ trợ công cụ dịch thuật: Albania, Amharic, Anh, Armenia, Azerbaijan, Ba Lan, Ba Tư, Bantu, Basque, Belarus, Bengal, Bosnia, Bulgaria, Bồ Đào Nha, Catalan, Cebuano, Chichewa, Corsi, Creole (Haiti), Croatia, Do Thái, Estonia, Filipino, Frisia, Gael Scotland, Galicia, George, Gujarat, Hausa, Hawaii, Hindi, Hmong, Hungary, Hy Lạp, Hà Lan, Hà Lan (Nam Phi), Hàn, Iceland, Igbo, Ireland, Java, Kannada, Kazakh, Khmer, Kinyarwanda, Klingon, Kurd, Kyrgyz, Latinh, Latvia, Litva, Luxembourg, Lào, Macedonia, Malagasy, Malayalam, Malta, Maori, Marathi, Myanmar, Mã Lai, Mông Cổ, Na Uy, Nepal, Nga, Nhật, Odia (Oriya), Pashto, Pháp, Phát hiện ngôn ngữ, Phần Lan, Punjab, Quốc tế ngữ, Rumani, Samoa, Serbia, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenia, Somali, Sunda, Swahili, Séc, Tajik, Tamil, Tatar, Telugu, Thái, Thổ Nhĩ Kỳ, Thụy Điển, Tiếng Indonesia, Tiếng Ý, Trung, Trung (Phồn thể), Turkmen, Tây Ban Nha, Ukraina, Urdu, Uyghur, Uzbek, Việt, Xứ Wales, Yiddish, Yoruba, Zulu, Đan Mạch, Đức, Ả Rập, dịch ngôn ngữ.

Copyright ©2024 I Love Translation. All reserved.

E-mail: