没有合适的资源?快使用搜索试试~ 我知道了~
首页精通Android:热门框架与布局实战指南
精通Android:热门框架与布局实战指南
需积分: 2 5 下载量 41 浏览量
更新于2024-07-19
收藏 10.45MB PDF 举报
"Android热门框架指南"
这本《Android热门框架指南》是一份非官方的免费教育资源,旨在帮助开发者深入理解和掌握Android开发的关键技术和流行框架。尽管与官方Android团队或公司无直接关联,但该书包含了1000多页的专业提示和技巧,覆盖了从入门到进阶的各个层面。
在《Android热门框架指南》中,首先介绍了如何开始Android开发。第一章“Getting started with Android”涵盖了创建新项目、设置Android Studio以及在没有集成开发环境(IDE)的情况下进行Android编程的基础知识。这包括:
1. **创建新项目**: 通过Android Studio快速创建一个基本的Android应用项目,涉及选择项目模板、配置项目属性和设置最小SDK版本等步骤。
2. **设置Android Studio**: 学习如何安装和配置Android Studio,包括导入SDK、设置AVD(Android虚拟设备)以进行模拟器测试和调试。
3. **无IDE编程**: 针对那些喜欢或需要在命令行环境中工作的开发者,介绍如何使用Gradle构建系统和Java编译器直接编写和管理Android应用。
接着,第二章“Layouts”深入探讨了Android布局管理,这是构建用户界面的关键部分:
1. **LayoutParams**: 了解LayoutParams类及其在不同布局容器中的应用,它是调整视图大小和位置的关键。
2. **Gravity and layout gravity**: 分析如何设置视图在父容器中的对齐方式,以及布局内的重力设置。
3. **CoordinatorLayout滚动行为**: CoordinatorLayout是实现高级滚动效果和交互的核心组件,如底部导航栏的隐藏/显示。
4. **PercentLayouts**: 使用百分比布局来创建适应不同屏幕尺寸的应用界面。
5. **ViewWeight**: 类似于iOS中的AutoLayout,ViewWeight允许在LinearLayout中分配视图权重,实现动态的布局分配。
6. **LinearLayout**: 创建线性布局,可以是水平或垂直排列的子视图。
7. **RelativeLayout**: 允许视图基于其他视图的位置进行布局,提供了更复杂的相对布局能力。
8. **FrameLayout**: 简单的容器布局,通常用于显示单个视图,如对话框或浮动动作按钮。
9. **GridLayout**: 用于创建网格状布局,支持多个列和行。
此外,书中还可能包含更多关于Android开发的高级主题,如数据持久化、网络通信、动画、性能优化以及各种热门框架(如RxJava、Dagger、Retrofit等)的使用方法。这些内容将帮助读者不仅掌握基础,还能跟上Android开发的最新趋势和技术。
《Android热门框架指南》是一本全面且实用的参考资料,适合想要提升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页未读,继续阅读
2009-08-06 上传
点击了解资源详情
点击了解资源详情
点击了解资源详情
点击了解资源详情
点击了解资源详情
点击了解资源详情
点击了解资源详情
Alex_Cin
- 粉丝: 3
- 资源: 49
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 平尾装配工作平台运输支撑系统设计与应用
- MAX-MIN Ant System:用MATLAB解决旅行商问题
- Flutter状态管理新秀:sealed_flutter_bloc包整合seal_unions
- Pong²开源游戏:双人对战图形化的经典竞技体验
- jQuery spriteAnimator插件:创建精灵动画的利器
- 广播媒体对象传输方法与设备的技术分析
- MATLAB HDF5数据提取工具:深层结构化数据处理
- 适用于arm64的Valgrind交叉编译包发布
- 基于canvas和Java后端的小程序“飞翔的小鸟”完整示例
- 全面升级STM32F7 Discovery LCD BSP驱动程序
- React Router v4 入门教程与示例代码解析
- 下载OpenCV各版本安装包,全面覆盖2.4至4.5
- 手写笔画分割技术的新突破:智能分割方法与装置
- 基于Koplowitz & Bruckstein算法的MATLAB周长估计方法
- Modbus4j-3.0.3版本免费下载指南
- PoqetPresenter:Sharp Zaurus上的开源OpenOffice演示查看器
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功