8.3.14 Paint Enumerations/Constants and ShadowLayer Shadow Effects
Category Android Basic Tutorial
Introduction to This Section:
>
In the Android Basic Tutorial - 8.3.1 Detailed Explanation of Three Drawing Tool Classes, we encountered several parameters of the Paint method, such as Paint.Style, Paint.Cap, Paint.Join, etc. These are enumerations in Paint. By setting these enumeration values, we can achieve specific effects, such as Style: brush style, Join: shape joining method, etc. In this section, we will delve into the source code of Paint to introduce these enumeration values one by one. Additionally, we will also discuss the ShadowLayer, which sets a shadow effect for Paint! By opening the source code of the Paint class, we can see the following enumeration values:
- 2.3.8 SeekBar (Drag Bar)
- 2.3.9 RatingBar (Star Rating Bar)
- 2.4.1 ScrollView (Scroll Bar)
- 2.4.2 Date & Time Components (Part 1)
- 2.4.3 Date & Time Components (Part 2)
- 2.4.4 Adapter Basics
- 2.4.5 Simple Usage of ListView
- 2.4.6 BaseAdapter Optimization
- 2.4.7 ListView Focus Issues
- 2.4.8 Solving ListView Checkbox Misalignment
- 2.4.9 ListView Data Update Issues
- 2.5.0 Building a Reusable Custom BaseAdapter
- 2.5.1 Implementing Multi-Layout ListView Items
- 2.5.2 Basic Usage of GridView (Grid View)
- 2.5.3 Basic Usage of Spinner (List Option Box)
- 2.5.4 Basic Usage of AutoCompleteTextView (Auto-Complete Text Box)
- 2.5.5 Basic Usage of ExpandableListView (Collapsible List)
- 2.5.6 Basic Usage of ViewFlipper (Flip View)
- 2.5.7 Basic Usage of Toast
- 2.5.8 Detailed Explanation of Notification (Status Bar Notification)
- 2.5.9 Detailed Explanation of AlertDialog (Dialog Box)
- 2.6.0 Basic Usage of Other Common Dialogs
- 2.6.1 Basic Usage of PopupWindow (Floating Box)
- 2.6.2 Menu (Menu)
- 2.6.3 Simple Usage of ViewPager
- 2.6.4 Simple Usage of DrawerLayout (Official Side Slider Menu)
- 3.1.1 Event Handling Mechanism Based on Listeners
- 3.2 Event Handling Mechanism Based on Callbacks
- 3.3 Analysis of Handler Message Passing Mechanism
- 3.4 TouchListener vs OnTouchEvent + Multi-Touch
- 3.5 Listening to Changes in EditText Content
- 3.6 Responding to System Setting Events (Configuration Class)
- 3.7 AsyncTask Asynchronous Task
- 3.8 Gestures (Gestures)
- 4.1.1 Activity Beginner
- 4.1.2 Activity Intermediate
- 4.1.3 Activity Advanced
- 4.2.1 Service Introduction
- 4.2.2 Service Advanced
- 4.2.3 Service Expert
- 4.3.1 BroadcastReceiver Beginner
- 4.3.2 BroadcastReceiver Advanced
- 4.4.1 ContentProvider Introduction
- 4.4.2 ContentProvider Deep Dive - Document Provider
- 4.5.1 Basic Usage of Intent
- 4.5.2 Passing Complex Data with Intent
- 5.1 Fragment Basic Overview
- 5.2.1 Fragment Example - Bottom Navigation Bar Implementation (Method 1)
- 5.2.2 Fragment Example - Bottom Navigation Bar Implementation (Method 2)
- 5.2.3 Fragment Example - Bottom Navigation Bar Implementation (Method 3)
- 5.2.4 Fragment Example - Bottom Navigation Bar + ViewPager Page Swipe
- 5.2.5 Fragment Example - Simple Implementation of News/Shopping App List Fragment
- 6.1 Data Storage and Access - File Storage and Reading
- 6.2 Data Storage and Access - SharedPreferences for Saving User Preferences
- 6.3.1 Data Storage and Access - Introduction to SQLite Database
- 6.3.2 Data Storage and Access - Deep Dive into SQLite Database
- 7.1.1 Android Network Programming and HTTP Protocol Learning
- 7.1.2 Android HTTP Request and Response Headers Learning
- 7.1.3 Android HTTP Request Method: HttpURLConnection
- 7.1.4 Android HTTP Request Method: HttpClient
- 7.2.1 Android XML Data Parsing
- 7.2.2 Android JSON Data Parsing
- 7.3.1 Android File Upload
- 7.3.2 Android File Download (1)
- 7.3.3 Android File Download (2)
- 7.4 Android Calling WebService
- 7.5.1 Basic Usage of WebView (Web View)
- 7.5.2 WebView and JavaScript Interaction Basics
- 7.5.3 WebView Considerations After Android 4.4
- 7.5.4 WebView File Download
- 7.5.5 WebView Cache Issues
- 7.5.6 WebView Handling Webpage Error Codes
- 7.6.1 Socket Learning Network Basics Preparation
- 7.6.2 Socket Communication Based on TCP Protocol (1)
- 7.6.3 Socket Communication Based on TCP Protocol (2)
- 7.6.4 Socket Communication Based on UDP Protocol
- 8.1.1 Summary of 13 Drawable Types in Android Part 1
- 8.1.2 Summary of 13 Drawable Types in Android Part 2
- 8.1.3 Summary of 13 Drawable Types in Android Part 3
8.3.4 Paint API — Xfermode and PorterDuff Detailed Explanation (Part 1)
8.3.5 Paint API — Xfermode and PorterDuff Detailed Explanation (Part 2)
8.3.6 Paint API — Xfermode and PorterDuff Detailed Explanation (Part 3)
8.3.7 Paint API — Xfermode and PorterDuff Detailed Explanation (Part 4)
8.3.8 Paint API — Xfermode and PorterDuff Detailed Explanation (Part 5)
8.3.14 Several Enumerations/Constants of Paint and ShadowLayer Shadow Effect
8.3.17 Canvas API Detailed Explanation (Part 2) Clipping Methods Collection
8.3.18 Canvas API Detailed Explanation (Part 3) Matrix and drawBitmapMesh
11.0 "2015 Latest Android Basic Beginner Tutorial" Completion Celebration~
12.1 Android Practice: DrySister App (First Edition) — Project Setup and Simple Implementation
12.2 DrySister App (First Edition) — 2. Parsing Backend Data
12.4 DrySister App (First Edition) — 4. Adding Data Caching (Introducing SQLite)
12.5 DrySister App (First Edition) — 5. Code Review, Adjustment, and Logging Class Writing
WeChat Subscription
English: