Android Studio Cheat Sheet



This is a short cheat sheet that Icreated to improve communication in mobile development. As Android reference I used Kotlin but it should be easy to understand for Java developers too.

Android Cheatsheet for Graphic Designers This simple cheatsheet should help graphic designers to do their job better, and to simplify developers' lives. Android Cheatsheet for Graphic Designers Graphic designers aren't programmers and sometimes don't know. Below is the android studio cheat sheet that shows all useful shortcuts. List of Android Studio Keyboard Shortcuts – Click Here to Download the Cheat Sheet – How to Change Shortcuts? You can change android studio shortcuts by simply visiting File Settings (for Mac visit Android Studio Preferences) and then got to Keymap tab.

Objective C is the Java of iOS whereas Swift is very similar to Kotlin. Like Kotlin in Android, Swift is a preferred language for new projects. Swift is a newer, modern language developed by Apple to make life easier for developers. Despite that Objective C is still popular and according to data from JetBrainsin 2019, almost 50% of iOS developers still know Objective C.

Here I covered Kotlin equivalents in Swift. Note that these equivalents are not identical, usually have small differences.

Note that both Garbage Collection and ARC manage memory but work in completely different ways.

AndroidiOS
nullnil
vallet
varvar
letif let
thisself
funfunc
whenswitch
MapDictionary
NullableOptional
Pair, Triple, etc.Tuple
listenerdelegate
interfaceprotocol
SQLite/RoomCore Data
Garbage CollectionAutomatic Reference Counting

Both Android and iOS Frameworks have a lifecycle. But in iOS, there are 2 important functions that don’t exist.

onSaveInstanceState/onRestoreInstanceState -> doesn’t exist

onActivityResult -> doesn’t exist. You have to use Navigation Controller with delegates (listeners).

Also, note that it’s tough to compare lifecycles from Android and iOS. I think that more detailed comparison deserves a separate article.

AndroidiOS
onCreateloadView (loading view manually)
onStart and onResumeviewDidLoad
app runningviewWillAppear
app runningviewDidAppear
onPause and onStopviewWillDisappear
onDestroyviewDidUnload

iOS is nothing like Android when it comes to layouts. In iOS, most of the layout oriented work is done using a mouse (like in the ‘Design’ mode in Android Studio) and Swift. For layouts you can use:

Sheet

1. XIB (XML Interface Builder) files. An older way to create layouts but it’s not outdated. This way every view layout has own XIB file.

2. Storyboards (one file with many views and navigation). Introduced in iOS 5. Manage many views and their navigation in one file.

Android Studio Java Cheat Sheet

Gradle’s equivalent is Cocoapods. The former one is a build tool used (not only) for Android apps also used in IDEs other than Android Studio. The latter one is a tightly coupled to XCode IDE.

Android studio cheat sheet
AndroidiOS
Android SDKCocoa Touch
GradleXCode Tools + Cocoapods
OkHttpAFNetworking/Alamofire/URLSession
Picasso/GlideSDWebImage/KingFisher
TimberCocoaLumberjack
RxJava/RxKotlinRxSwift/Bond
RetrofitMoya
GSON/MoshiSwiftyJSON/Codable
SpekQuick

Note that iOS doesn’t have ViewGroups because they are regular Views.

AndroidiOS
TextViewLabel
single-line EditTextTextField
multi-line scrollable EditTextTextView
simple RecyclerViewTableView
customizable RecyclerViewCollectionView
Popup menuContext menu
Bottom sheetAction menu
ViewPagerPageViewController
Seek barSlider
View.VISIBLE/View.INVISIBLEisHidden
View.GONEStackView or constraints
enableduserInteractionEnabled
SpinnerPickerView
ProgressViewProgressView (also Spinner)

It’s good to know Android equivalents in iOS. Usually, it’s better to communicate using names well known in programming, not only in your framework. But it’s not always possible or just doesn’t happen.

Download this free cheat sheet in PDF HERE.

Update: Check out r/androiddev Reddit discussion about this article which supplements it and brings many good ideas.

If you want to be notified about more articles like this one, subscribe below.

At Portcullis, assessing Android applications is a frequent activity for us and we figured it would be helpful to assist others looking to get into the field of testing Android applications. To this end, we’ve compiled a cheat sheet below, it contains a number of commonly used ADB commands, as well as useful commands to assist in gathering information or performing less common tasks.

Android Studio Cheat Sheet Mac

This particular cheat sheet has been written for use with Cheat so that it can be quickly looked up within a terminal.

The post Android cheat sheet appeared first on Portcullis Labs.

Android Studio Java Cheat Sheet

Source: /teehs-taehc-diordna/golb/ku.oc.silluctrop.sbal