没有合适的资源?快使用搜索试试~ 我知道了~
首页专业Android技术深度探索
专业Android技术深度探索
需积分: 9 3 下载量 83 浏览量
更新于2024-07-19
1
收藏 10.45MB PDF 举报
"Android最新技术指南,涵盖从入门到进阶的Android开发知识,包括创建项目、设置Android Studio、无IDE编程、应用基础、虚拟设备配置、布局设计等多个方面。"
在《Android最新技术指南》中,作者为Android开发者提供了一系列专业提示和技巧,旨在帮助他们提升开发效率和应用质量。以下是一些关键章节和知识点的详细概述:
1. **入门Android**
- **创建新项目**:这部分讲解如何在Android Studio中启动一个新项目,包括选择项目模板、配置项目属性以及初始化代码结构。
- **设置Android Studio**:介绍了Android Studio的安装、配置和更新,以及如何优化IDE的工作环境,如调整主题、设置快捷键和导入插件等。
- **无IDE编程**:对于喜欢命令行的开发者,这部分提供了使用Gradle构建系统和文本编辑器进行Android开发的方法。
- **应用基础**:涵盖了Android应用程序的基本架构,包括Activity、Intent、Broadcast Receiver、Service等核心组件的理解与使用。
2. **布局设计**
- **LayoutParams**:讨论了不同类型的LayoutParams,它们决定了视图在布局中的大小和位置。
- **Gravity和layout_gravity**:解释了这两个属性如何控制视图在容器内的对齐方式。
- **CoordinatorLayout滚动行为**:介绍了CoordinatorLayout如何与其他布局组件协同工作,实现高级的滚动效果。
- **PercentLayouts**:百分比布局允许开发者根据父视图的大小来定义子视图的尺寸,适配不同屏幕尺寸。
- **ViewWeight**:类似于LinearLayout中的weight属性,用于在布局中按比例分配空间。
- **程序化创建LinearLayout**:展示了如何在代码中动态创建和添加LinearLayout及其子视图。
- **LinearLayout**:详细阐述了线性布局的使用,包括垂直和水平布局方向。
- **RelativeLayout**:讲解了相对布局的规则,如何定义视图之间的相对位置。
- **FrameLayout**:用于显示单个视图,常用于浮动对话框或全屏覆盖视图。
- **GridLayout**:网格布局允许将视图组织成多行多列的网格。
这本1000多页的指南深入浅出地涵盖了Android开发的各个方面,无论是初学者还是经验丰富的开发者,都能从中获取有价值的见解和实践建议。每个章节都包含了大量的实例和最佳实践,旨在帮助读者理解和掌握Android开发的关键技术。由于篇幅所限,这里仅列举了部分内容,完整版的指南将提供更全面的知识点覆盖。
Section 98.4: Multiple domains and multiple paths 682 ...............................................................................................
Section 98.5: Both http and https for the same domain 683 .......................................................................................
Section 98.6: Using pathPrefix 683 .................................................................................................................................
Chapter 99: Canvas drawing using SurfaceView 684 .....................................................................................
Section 99.1: SurfaceView with drawing thread 684 .....................................................................................................
Chapter 100: Firebase 689 ............................................................................................................................................
Section 100.1: Add Firebase to Your Android Project 689 .............................................................................................
Section 100.2: Updating a Firebase users's email 690 ..................................................................................................
Section 100.3: Create a Firebase user 691 .....................................................................................................................
Section 100.4: Change Password 692 .............................................................................................................................
Section 100.5: Firebase Cloud Messaging 693 ...............................................................................................................
Section 100.6: Firebase Storage Operations 695 ..........................................................................................................
Section 100.7: Firebase Realtime Database: how to set/get data 701 .......................................................................
Section 100.8: Demo of FCM based notifications 702 ...................................................................................................
Section 100.9: Sign In Firebase user with email and password 712 ............................................................................
Section 100.10: Send Firebase password reset email 713 ............................................................................................
Section 100.11: Re-Authenticate Firebase user 715 .......................................................................................................
Section 100.12: Firebase Sign Out 716 ............................................................................................................................
Chapter 101: Crash Reporting Tools 717 ................................................................................................................
Section 101.1: Fabric - Crashlytics 717 .............................................................................................................................
Section 101.2: Capture crashes using Sherlock 721 .......................................................................................................
Section 101.3: Force a Test Crash With Fabric 722 ........................................................................................................
Section 101.4: Crash Reporting with ACRA 723 ..............................................................................................................
Chapter 102: Check Internet Connectivity 725 ...................................................................................................
Section 102.1: Check if device has internet connectivity 725 ........................................................................................
Section 102.2: How to check network strength in android? 725 ..................................................................................
Section 102.3: How to check network strength 726 ......................................................................................................
Chapter 103: Facebook SDK for Android 729 ......................................................................................................
Section 103.1: How to add Facebook Login in Android 729 ..........................................................................................
Section 103.2: Create your own custom button for Facebook login 731 ....................................................................
Section 103.3: A minimalistic guide to Facebook login/signup implementation 732 ................................................
Section 103.4: Setting permissions to access data from the Facebook profile 733 ..................................................
Section 103.5: Logging out of Facebook 733 .................................................................................................................
Chapter 104: Unzip File in Android 734 ...................................................................................................................
Section 104.1: Unzip file 734 .............................................................................................................................................
Chapter 105: Android Places API 735 .......................................................................................................................
Section 105.1: Getting Current Places by Using Places API 735 ...................................................................................
Section 105.2: Place Autocomplete Integration 736 .....................................................................................................
Section 105.3: Place Picker Usage Example 737 ...........................................................................................................
Section 105.4: Setting place type filters for PlaceAutocomplete 738 ..........................................................................
Section 105.5: Adding more than one google auto complete activity 739 .................................................................
Chapter 106: Creating your own libraries for Android applications 741 ..............................................
Section 106.1: Create a library available on Jitpack.io 741 ..........................................................................................
Section 106.2: Creating library project 741 ....................................................................................................................
Section 106.3: Using library in project as a module 742 ...............................................................................................
Chapter 107: Gson 743 ....................................................................................................................................................
Section 107.1: Parsing JSON with Gson 743 ...................................................................................................................
Section 107.2: Adding a custom Converter to Gson 745 ..............................................................................................
Section 107.3: Parsing a List<String> with Gson 745 .....................................................................................................
Section 107.4: Adding Gson to your project 746 ............................................................................................................
Section 107.5: Parsing JSON to Generic Class Object with Gson 746 .........................................................................
Section 107.6: Using Gson with inheritance 747 .............................................................................................................
Section 107.7: Parsing JSON property to enum with Gson 749 ...................................................................................
Section 107.8: Using Gson to load a JSON file from disk 749 ......................................................................................
Section 107.9: Using Gson as serializer with Retrofit 749 .............................................................................................
Section 107.10: Parsing json array to generic class using Gson 750 ...........................................................................
Section 107.11: Custom JSON Deserializer using Gson 751 ...........................................................................................
Section 107.12: JSON Serialization/Deserialization with AutoValue and Gson 752 ...................................................
Chapter 108: Device Display Metrics 754 ...............................................................................................................
Section 108.1: Get the screens pixel dimensions 754 .....................................................................................................
Section 108.2: Get screen density 754 ............................................................................................................................
Section 108.3: Formula px to dp, dp to px conversation 754 .......................................................................................
Chapter 109: TextView 755 ............................................................................................................................................
Section 109.1: Spannable TextView 755 ..........................................................................................................................
Section 109.2: Strikethrough TextView 756 ....................................................................................................................
Section 109.3: TextView with image 757 .........................................................................................................................
Section 109.4: Make RelativeSizeSpan align to top 757 ...............................................................................................
Section 109.5: Pinchzoom on TextView 759 ...................................................................................................................
Section 109.6: Textview with dierent Textsize 760 ......................................................................................................
Section 109.7: Theme and Style customization 760 ......................................................................................................
Section 109.8: TextView customization 762 ...................................................................................................................
Section 109.9: Single TextView with two dierent colors 765 ......................................................................................
Chapter 110: ListView 767 ..............................................................................................................................................
Section 110.1: Custom ArrayAdapter 767 ........................................................................................................................
Section 110.2: A basic ListView with an ArrayAdapter 768 ...........................................................................................
Section 110.3: Filtering with CursorAdapter 768 .............................................................................................................
Chapter 111: Building Backwards Compatible Apps 770 .................................................................................
Section 111.1: How to handle deprecated API 770 ..........................................................................................................
Chapter 112: Loader 772 .................................................................................................................................................
Section 112.1: Basic AsyncTaskLoader 772 .....................................................................................................................
Section 112.2: AsyncTaskLoader with cache 773 ...........................................................................................................
Section 112.3: Reloading 774 ............................................................................................................................................
Section 112.4: Pass parameters using a Bundle 775 .....................................................................................................
Chapter 113: ProGuard - Obfuscating and Shrinking your code 776 .......................................................
Section 113.1: Rules for some of the widely used Libraries 776 ....................................................................................
Section 113.2: Remove trace logging (and other) statements at build time 778 .......................................................
Section 113.3: Protecting your code from hackers 778 .................................................................................................
Section 113.4: Enable ProGuard for your build 779 ........................................................................................................
Section 113.5: Enabling ProGuard with a custom obfuscation configuration file 779 ................................................
Chapter 114: Detect Shake Event in Android 781 ..............................................................................................
Section 114.1: Shake Detector in Android Example 781 .................................................................................................
Section 114.2: Using Seismic shake detection 782 .........................................................................................................
Chapter 115: Typedef Annotations: @IntDef, @StringDef 783 ...................................................................
Section 115.1: IntDef Annotations 783 ..............................................................................................................................
Section 115.2: Combining constants with flags 783 .......................................................................................................
Chapter 116: Capturing Screenshots 785 ...............................................................................................................
Section 116.1: Taking a screenshot of a particular view 785 .........................................................................................
Section 116.2: Capturing Screenshot via Android Studio 785 .......................................................................................
Section 116.3: Capturing Screenshot via ADB and saving directly in your PC 786 .....................................................
Section 116.4: Capturing Screenshot via Android Device Monitor 786 ........................................................................
Section 116.5: Capturing Screenshot via ADB 787 .........................................................................................................
Chapter 117: MVP Architecture 788 ...........................................................................................................................
Section 117.1: Login example in the Model View Presenter (MVP) pattern 788 ..........................................................
Section 117.2: Simple Login Example in MVP 791 ..........................................................................................................
Chapter 118: Orientation Changes 798 ....................................................................................................................
Section 118.1: Saving and Restoring Activity State 798 .................................................................................................
Section 118.2: Retaining Fragments 798 .........................................................................................................................
Section 118.3: Manually Managing Configuration Changes 799 ..................................................................................
Section 118.4: Handling AsyncTask 800 ..........................................................................................................................
Section 118.5: Lock Screen's rotation programmatically 801 .......................................................................................
Section 118.6: Saving and Restoring Fragment State 802 ............................................................................................
Chapter 119: Xposed 804 ................................................................................................................................................
Section 119.1: Creating a Xposed Module 804 ................................................................................................................
Section 119.2: Hooking a method 804 .............................................................................................................................
Chapter 120: Security 806 ..............................................................................................................................................
Section 120.1: Verifying App Signature - Tamper Detection 806 .................................................................................
Chapter 121: PackageManager 807 ..........................................................................................................................
Section 121.1: Retrieve application version 807 ..............................................................................................................
Section 121.2: Version name and version code 807 ......................................................................................................
Section 121.3: Install time and update time 807 .............................................................................................................
Section 121.4: Utility method using PackageManager 808 ...........................................................................................
Chapter 122: ImageView 810 ........................................................................................................................................
Section 122.1: Set tint 810 .................................................................................................................................................
Section 122.2: Set alpha 811 ............................................................................................................................................
Section 122.3: Set Scale Type 811 ...................................................................................................................................
Section 122.4: ImageView ScaleType - Center 816 .......................................................................................................
Section 122.5: ImageView ScaleType - CenterCrop 818 ...............................................................................................
Section 122.6: ImageView ScaleType - CenterInside 820 .............................................................................................
Section 122.7: ImageView ScaleType - FitStart and FitEnd 822 ..................................................................................
Section 122.8: ImageView ScaleType - FitCenter 826 ...................................................................................................
Section 122.9: Set Image Resource 828 ..........................................................................................................................
Section 122.10: ImageView ScaleType - FitXy 829 ........................................................................................................
Section 122.11: MLRoundedImageView.java 831 ............................................................................................................
Chapter 123: Gesture Detection 834 .........................................................................................................................
Section 123.1: Swipe Detection 834 ..................................................................................................................................
Section 123.2: Basic Gesture Detection 835 ...................................................................................................................
Chapter 124: Doze Mode 837 .......................................................................................................................................
Section 124.1: Whitelisting an Android application programmatically 837 .................................................................
Section 124.2: Exclude app from using doze mode 837 ...............................................................................................
Chapter 125: Android Sound and Media 838 ........................................................................................................
Section 125.1: How to pick image and video for api >19 838 ........................................................................................
Section 125.2: Play sounds via SoundPool 839 ..............................................................................................................
Chapter 126: SearchView 840 ......................................................................................................................................
Section 126.1: Setting Theme for SearchView 840 .........................................................................................................
Section 126.2: SearchView in Toolbar with Fragment 840 ...........................................................................................
Section 126.3: Appcompat SearchView with RxBindings watcher 842 ........................................................................
Chapter 127: Camera and Gallery 845 ....................................................................................................................
Section 127.1: Take photo 845 ..........................................................................................................................................
Section 127.2: Taking full-sized photo from camera 847 .............................................................................................
Section 127.3: Decode bitmap correctly rotated from the uri fetched with the intent 850 .......................................
Section 127.4: Set camera resolution 852 .......................................................................................................................
Section 127.5: How to start camera or gallery and save camera result to storage 852 ..........................................
Chapter 128: Callback URL 856 ...................................................................................................................................
Section 128.1: Callback URL example with Instagram OAuth 856 ...............................................................................
Chapter 129: Twitter APIs 857 ......................................................................................................................................
Section 129.1: Creating login with twitter button and attach a callback to it 857 ......................................................
Chapter 130: Drawables 859 ........................................................................................................................................
Section 130.1: Custom Drawable 859 ..............................................................................................................................
Section 130.2: Tint a drawable 860 .................................................................................................................................
Section 130.3: Circular View 861 ......................................................................................................................................
Section 130.4: Make View with rounded corners 861 ....................................................................................................
Chapter 131: Colors 863 ...................................................................................................................................................
Section 131.1: Color Manipulation 863 ..............................................................................................................................
Chapter 132: ConstraintLayout 864 ..........................................................................................................................
Section 132.1: Adding ConstraintLayout to your project 864 .......................................................................................
Section 132.2: Chains 865 .................................................................................................................................................
Chapter 133: RenderScript 866 ...................................................................................................................................
Section 133.1: Getting Started 866 ...................................................................................................................................
Section 133.2: Blur a View 872 .........................................................................................................................................
Section 133.3: Blur an image 874 ....................................................................................................................................
Chapter 134: Fresco 877 .................................................................................................................................................
Section 134.1: Getting Started with Fresco 877 ..............................................................................................................
Section 134.2: Using OkHttp 3 with Fresco 878 ..............................................................................................................
Section 134.3: JPEG Streaming with Fresco using DraweeController 878 ..................................................................
Chapter 135: Swipe to Refresh 879 ...........................................................................................................................
Section 135.1: How to add Swipe-to-Refresh To your app 879 ....................................................................................
Section 135.2: Swipe To Refresh with RecyclerView 879 ..............................................................................................
Chapter 136: AutoCompleteTextView 881 .............................................................................................................
Section 136.1: AutoComplete with CustomAdapter, ClickListener and Filter 881 .......................................................
Section 136.2: Simple, hard-coded AutoCompleteTextView 884 .................................................................................
Chapter 137: Installing apps with ADB 885 ...........................................................................................................
Section 137.1: Uninstall an app 885 .................................................................................................................................
Section 137.2: Install all apk file in directory 885 ...........................................................................................................
Section 137.3: Install an app 885 .....................................................................................................................................
Chapter 138: IntentService 886 ...................................................................................................................................
Section 138.1: Creating an IntentService 886 ..................................................................................................................
Section 138.2: Basic IntentService Example 886 ............................................................................................................
Section 138.3: Sample Intent Service 887 .......................................................................................................................
Chapter 139: AdMob 889 .................................................................................................................................................
Section 139.1: Implementing 889 ......................................................................................................................................
Chapter 140: Implicit Intents 891 ...............................................................................................................................
Section 140.1: Implicit and Explicit Intents 891 ...............................................................................................................
Section 140.2: Implicit Intents 891 ...................................................................................................................................
Chapter 141: Publish to Play Store 892 ...................................................................................................................
Section 141.1: Minimal app submission guide 892 ..........................................................................................................
Chapter 142: Firebase Realtime DataBase 894 .................................................................................................
Section 142.1: Quick setup 894 .........................................................................................................................................
Section 142.2: Firebase Realtime DataBase event handler 894 ..................................................................................
Section 142.3: Understanding firebase JSON database 895 .......................................................................................
Section 142.4: Retrieving data from firebase 896 .........................................................................................................
Section 142.5: Listening for child updates 897 ...............................................................................................................
Section 142.6: Retrieving data with pagination 898 ......................................................................................................
Section 142.7: Denormalization: Flat Database Structure 899 .....................................................................................
Section 142.8: Designing and understanding how to retrieve realtime data from the Firebase Database
901 .............................................................................................................................................................................
Chapter 143: Image Compression 904 ....................................................................................................................
Section 143.1: How to compress image without size change 904 ................................................................................
Chapter 144: Email Validation 907 ...........................................................................................................................
Section 144.1: Email address validation 907 ...................................................................................................................
Section 144.2: Email Address validation with using Patterns 907 ................................................................................
Chapter 145: Keyboard 908 .........................................................................................................................................
Section 145.1: Register a callback for keyboard open and close 908 .........................................................................
Section 145.2: Hide keyboard when user taps anywhere else on the screen 908 .....................................................
Chapter 146: Button 910 ................................................................................................................................................
Section 146.1: Using the same click event for one or more Views in the XML 910 .....................................................
Section 146.2: Defining external Listener 910 ................................................................................................................
Section 146.3: inline onClickListener 911 .........................................................................................................................
Section 146.4: Customizing Button style 911 ..................................................................................................................
Section 146.5: Custom Click Listener to prevent multiple fast clicks 915 ....................................................................
Section 146.6: Using the layout to define a click action 915 ........................................................................................
Section 146.7: Listening to the long click events 916 .....................................................................................................
Chapter 147: TextInputLayout 917 ...........................................................................................................................
Section 147.1: Basic usage 917 .........................................................................................................................................
Section 147.2: Password Visibility Toggles 917 ..............................................................................................................
Section 147.3: Adding Character Counting 917 .............................................................................................................
Section 147.4: Handling Errors 918 .................................................................................................................................
Section 147.5: Customizing the appearance of the TextInputLayout 918 ..................................................................
Section 147.6: TextInputEditText 919 ..............................................................................................................................
Chapter 148: Bottom Sheets 921 ...............................................................................................................................
Section 148.1: Quick Setup 921 ........................................................................................................................................
Section 148.2: BottomSheetBehavior like Google maps 921 .......................................................................................
Section 148.3: Modal bottom sheets with BottomSheetDialog 928 .............................................................................
Section 148.4: Modal bottom sheets with BottomSheetDialogFragment 928 ............................................................
Section 148.5: Persistent Bottom Sheets 928 .................................................................................................................
Section 148.6: Open BottomSheet DialogFragment in Expanded mode by default 929 ..........................................
Chapter 149: CoordinatorLayout and Behaviors 931 .....................................................................................
Section 149.1: Creating a simple Behavior 931 ..............................................................................................................
Section 149.2: Using the SwipeDismissBehavior 932 .....................................................................................................
Section 149.3: Create dependencies between Views 932 .............................................................................................
Chapter 150: EditText 934 .............................................................................................................................................
Section 150.1: Working with EditTexts 934 ......................................................................................................................
Section 150.2: Customizing the InputType 936 ..............................................................................................................
Section 150.3: Icon or button inside Custom Edit Text and its action and click listeners 936 ...................................
Section 150.4: Hiding SoftKeyboard 938 ........................................................................................................................
剩余1324页未读,继续阅读
2015-08-07 上传
2020-04-28 上传
207 浏览量
点击了解资源详情
点击了解资源详情
点击了解资源详情
点击了解资源详情
Alex_Cin
- 粉丝: 3
- 资源: 49
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Android圆角进度条控件的设计与应用
- mui框架实现带侧边栏的响应式布局
- Android仿知乎横线直线进度条实现教程
- SSM选课系统实现:Spring+SpringMVC+MyBatis源码剖析
- 使用JavaScript开发的流星待办事项应用
- Google Code Jam 2015竞赛回顾与Java编程实践
- Angular 2与NW.js集成:通过Webpack和Gulp构建环境详解
- OneDayTripPlanner:数字化城市旅游活动规划助手
- TinySTM 轻量级原子操作库的详细介绍与安装指南
- 模拟PHP序列化:JavaScript实现序列化与反序列化技术
- ***进销存系统全面功能介绍与开发指南
- 掌握Clojure命名空间的正确重新加载技巧
- 免费获取VMD模态分解Matlab源代码与案例数据
- BuglyEasyToUnity最新更新优化:简化Unity开发者接入流程
- Android学生俱乐部项目任务2解析与实践
- 掌握Elixir语言构建高效分布式网络爬虫
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功