Skip to content

Commit

Permalink
update mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
tazirahmb committed Dec 24, 2018
1 parent 0e24fcc commit 0c34e04
Show file tree
Hide file tree
Showing 49 changed files with 1,135 additions and 734 deletions.
1 change: 1 addition & 0 deletions mobile/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pbxproj -text
47 changes: 35 additions & 12 deletions mobile/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,15 @@ import AccountStack from './src/animeaccount/screen/AnimeAccountScreen';
import GenreStack from './src/animegenre/AnimeGenreScreen';

import {Provider} from 'react-redux';
import reducers from './src/public/controller/redux/store';
import store from './src/public/controller/redux/store';

// import getPopularAnime from './src/public/controller/AnimeController';
import Colors from './src/assets/colors';

export default class App extends Component {

// componentDidMount() {
// getPopularAnime(10);
// }

render() {
return (
<Provider store={reducers}>
<Provider store={store}>
<StyleProvider style={getTheme(commonColor)}>
<AppContainer />
</StyleProvider>
Expand All @@ -35,11 +31,38 @@ export default class App extends Component {

const RootStack = createBottomTabNavigator(
{
home: {screen: HomeStack},
search: {screen: SearchStack},
genre: {screen: GenreStack},
animelist: {screen: ListStack},
account: {screen: AccountStack}
Home: {screen: HomeStack},
Search: {screen: SearchStack},
Genre: {screen: GenreStack},
List: {screen: ListStack},
Account: {screen: AccountStack}
},
{
lazy: true,
tabBarOptions: {
style: {backgroundColor: Colors.pureBlack},
activeTintColor: Colors.primaryColor,
inactiveTintColor: Colors.pureWhite
},
defaultNavigationOptions: ({ navigation }) => ({
tabBarIcon: ({ focused, horizontal, tintColor }) => {
const { routeName } = navigation.state;
let iconName;
if (routeName === 'Home') {
iconName = `home`;
} else if (routeName === 'Search') {
iconName = `search`;
} else if (routeName === 'Genre') {
iconName = `albums`;
} else if (routeName === 'List') {
iconName = `list`;
} else if (routeName === 'Account') {
iconName = `contact`;
}

return <Icon name={iconName} style={{color: tintColor, fontSize: 20}} />;
},
})
}
);

Expand Down
2 changes: 0 additions & 2 deletions mobile/README.md

This file was deleted.

15 changes: 15 additions & 0 deletions mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,18 @@ android {
abiFilters "armeabi-v7a", "x86"
}
}

signingConfigs {
release {
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
}

splits {
abi {
reset()
Expand All @@ -119,6 +131,7 @@ android {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
}
}
// applicationVariants are e.g. debug, release
Expand All @@ -137,6 +150,8 @@ android {
}

dependencies {
compile project(':react-native-svg')
compile project(':react-native-android-fullscreen-webview-video')
compile project(':react-native-gesture-handler')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
Expand Down
2 changes: 1 addition & 1 deletion mobile/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import android.app.Application;

import com.facebook.react.ReactApplication;
import com.horcrux.svg.SvgPackage;
import com.airship.customwebview.CustomWebViewPackage;
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
Expand All @@ -24,6 +26,8 @@ public boolean getUseDeveloperSupport() {
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new SvgPackage(),
new CustomWebViewPackage(),
new RNGestureHandlerPackage()
);
}
Expand Down
5 changes: 5 additions & 0 deletions mobile/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
MYAPP_RELEASE_KEY_ALIAS=my-key-alias
MYAPP_RELEASE_STORE_PASSWORD=dummy987
MYAPP_RELEASE_KEY_PASSWORD=dummy987
4 changes: 4 additions & 0 deletions mobile/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
rootProject.name = 'animexandroid'
include ':react-native-svg'
project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android')
include ':react-native-android-fullscreen-webview-video'
project(':react-native-android-fullscreen-webview-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-android-fullscreen-webview-video/android')
include ':react-native-gesture-handler'
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')

Expand Down
28 changes: 28 additions & 0 deletions mobile/ios/animexandroid.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
9AD6D4596E05442A92CC4D43 /* SimpleLineIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 25C4612767DB4DE09F208743 /* SimpleLineIcons.ttf */; };
795E0B334BF3423F89553A36 /* Zocial.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 5D3AEA99401B4824A2E4B0C1 /* Zocial.ttf */; };
688ADA4223BE44F1B21808A8 /* libRNGestureHandler.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E8BF91B43DEC4050A5F128CC /* libRNGestureHandler.a */; };
5FC5EBDD7AC24190B41F9658 /* libRNSVG.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1C586BF1E2154229B3BF796E /* libRNSVG.a */; };
0B44B39376BD4C2CABC3B855 /* libRNSVG-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CA503417F97C48D69F95689C /* libRNSVG-tvOS.a */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -373,6 +375,9 @@
5D3AEA99401B4824A2E4B0C1 /* Zocial.ttf */ = {isa = PBXFileReference; name = "Zocial.ttf"; path = "../node_modules/native-base/Fonts/Zocial.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
1D9A6C5D611D41469F83491F /* RNGestureHandler.xcodeproj */ = {isa = PBXFileReference; name = "RNGestureHandler.xcodeproj"; path = "../node_modules/react-native-gesture-handler/ios/RNGestureHandler.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
E8BF91B43DEC4050A5F128CC /* libRNGestureHandler.a */ = {isa = PBXFileReference; name = "libRNGestureHandler.a"; path = "libRNGestureHandler.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
2A892CC299BB4D7A9CE3877E /* RNSVG.xcodeproj */ = {isa = PBXFileReference; name = "RNSVG.xcodeproj"; path = "../node_modules/react-native-svg/ios/RNSVG.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
1C586BF1E2154229B3BF796E /* libRNSVG.a */ = {isa = PBXFileReference; name = "libRNSVG.a"; path = "libRNSVG.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
CA503417F97C48D69F95689C /* libRNSVG-tvOS.a */ = {isa = PBXFileReference; name = "libRNSVG-tvOS.a"; path = "libRNSVG-tvOS.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -401,6 +406,7 @@
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
688ADA4223BE44F1B21808A8 /* libRNGestureHandler.a in Frameworks */,
5FC5EBDD7AC24190B41F9658 /* libRNSVG.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -416,6 +422,7 @@
2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */,
2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */,
2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */,
0B44B39376BD4C2CABC3B855 /* libRNSVG-tvOS.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -588,6 +595,7 @@
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
1D9A6C5D611D41469F83491F /* RNGestureHandler.xcodeproj */,
2A892CC299BB4D7A9CE3877E /* RNSVG.xcodeproj */,
);
name = Libraries;
sourceTree = "<group>";
Expand Down Expand Up @@ -1253,10 +1261,13 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)\..\node_modules\react-native-gesture-handler\ios/**",
"$(SRCROOT)\..\node_modules\react-native-svg\ios/**",
);
};
name = Debug;
Expand All @@ -1279,10 +1290,13 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)\..\node_modules\react-native-gesture-handler\ios/**",
"$(SRCROOT)\..\node_modules\react-native-svg\ios/**",
);
};
name = Release;
Expand All @@ -1306,6 +1320,7 @@
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)\..\node_modules\react-native-gesture-handler\ios/**",
"$(SRCROOT)\..\node_modules\react-native-svg\ios/**",
);
};
name = Debug;
Expand All @@ -1328,6 +1343,7 @@
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)\..\node_modules\react-native-gesture-handler\ios/**",
"$(SRCROOT)\..\node_modules\react-native-svg\ios/**",
);
};
name = Release;
Expand Down Expand Up @@ -1358,10 +1374,13 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)\..\node_modules\react-native-gesture-handler\ios/**",
"$(SRCROOT)\..\node_modules\react-native-svg\ios/**",
);
};
name = Debug;
Expand Down Expand Up @@ -1392,10 +1411,13 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)\..\node_modules\react-native-gesture-handler\ios/**",
"$(SRCROOT)\..\node_modules\react-native-svg\ios/**",
);
};
name = Release;
Expand Down Expand Up @@ -1425,10 +1447,13 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)\..\node_modules\react-native-gesture-handler\ios/**",
"$(SRCROOT)\..\node_modules\react-native-svg\ios/**",
);
};
name = Debug;
Expand Down Expand Up @@ -1458,10 +1483,13 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)\..\node_modules\react-native-gesture-handler\ios/**",
"$(SRCROOT)\..\node_modules\react-native-svg\ios/**",
);
};
name = Release;
Expand Down
2 changes: 1 addition & 1 deletion mobile/native-base-theme/components/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ export default (variables /*: * */ = variable) => {
fontFamily: variables.btnFontFamily,
marginLeft: 0,
marginRight: 0,
color: variables.inverseTextColor,
color: variables.textColor,
fontSize: variables.btnTextSize,
paddingHorizontal: 16,
backgroundColor: "transparent"
Expand Down
4 changes: 2 additions & 2 deletions mobile/native-base-theme/components/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ export default (variables /*: * */ = variable) => {
borderColor: variables.cardBorderColor,
flexWrap: "nowrap",
backgroundColor: variables.cardDefaultBg,
shadowColor: "#000",
shadowColor: "#AAA",
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.1,
shadowOpacity: 0.4,
shadowRadius: 1.5,
elevation: 3
};
Expand Down
2 changes: 1 addition & 1 deletion mobile/native-base-theme/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { PixelRatio, StatusBar } from "react-native";

import variable from "./../variables/platform";
import variable from "./../variables/commonColor";

export default (variables /*: * */ = variable) => {
const platformStyle = variables.platformStyle;
Expand Down
Loading

0 comments on commit 0c34e04

Please sign in to comment.