Porting to Android
The Android modifications we will make for this app are similar to the changes made for Expenses
, which will be discussed later in Chapter 9,Additional React Native Components. The modifications we are making for Friends
is as follows:
- Swapping out
TabBarIOS
forDrawerLayoutAndroid
andToolbarAndroid
- Creating
Drawer
andDrawerRow
components to supportDrawerLayoutAndroid
- Using
Navigator
in the root-levelindex.android.js
file - Creating an Android-specific version of the
App
component - Updating
FeedList
for Android-specific styling - Modifying
FeedListRow
to support Android navigation - Adding
BackAndroid
andNavigator
support toPostView
Note
In-depth explanations for DrawerLayoutAndroid
and ToolbarAndroid
can be found in Chapter 9, Additional React Native Components.
Adding DrawerLayoutAndroid and ToolbarAndroid
Let's begin by adding Toolbar/Drawer-based navigation for the Android version of Friends. We will need to start by creating a component called Drawer
, which performs the following...