-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
186 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,12 @@ Second terminal: | |
npm run android | ||
``` | ||
|
||
## Build apk | ||
|
||
``` | ||
./build-apk.sh | ||
``` | ||
|
||
## Version release | ||
|
||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
cd android | ||
./gradlew bundleRelease | ||
cd .. | ||
|
||
bta='https://github.com/google/bundletool/releases/download/1.4.0/bundletool-all-1.4.0.jar' | ||
btl='/tmp/bundletool-all-1.4.0.jar' | ||
|
||
if [ ! -f "$btl" ]; then | ||
wget $bta -O $btl | ||
fi | ||
|
||
apks='myapp.apks' | ||
|
||
java -jar "$btl" build-apks \ | ||
--bundle="android/app/build/outputs/bundle/release/app-release.aab" \ | ||
--output="$apks" \ | ||
--ks="android/app/my-upload-key.keystore" \ | ||
--ks-pass=pass:123456 \ | ||
--ks-key-alias=my-key-alias \ | ||
--key-pass=pass:123456 \ | ||
--mode=universal | ||
|
||
apkname=$(cat package.json | jq -r '.name') | ||
apkname="$apkname-$(cat package.json | jq -r '.version').apk" | ||
|
||
unzip -p $apks universal.apk > $apkname | ||
rm $apks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
import {Linking, SafeAreaView, ScrollView, StyleSheet, Text, View} from "react-native"; | ||
import React from "react"; | ||
import Image from "react-native-scalable-image"; | ||
import {Dev_Width, lpuColor, textColor, transparent} from "./Const"; | ||
import HTMLView from "react-native-htmlview"; | ||
import IoniIcons from "react-native-vector-icons/Ionicons"; | ||
|
||
export default function NewsItem(props) { | ||
|
||
const content = props.content; | ||
const setContent = props.setContentFn; | ||
|
||
return ( | ||
<SafeAreaView style={styles.view}> | ||
<ScrollView horizontal={false} style={styles.content}> | ||
<Text style={styles.title}> | ||
{content.title} | ||
</Text> | ||
<Image width={Dev_Width - 20} source={content.bigImg}/> | ||
<HTMLView stylesheet={htmlStyles} | ||
style={styles.news} | ||
addLineBreaks={false} | ||
value={content.content} | ||
/> | ||
</ScrollView> | ||
<View style={styles.buttons}> | ||
<IoniIcons.Button | ||
name="arrow-back" | ||
onPress={() => setContent({})} | ||
backgroundColor={transparent} | ||
underlayColor={transparent} | ||
size={30} | ||
borderRadius={0} | ||
iconStyle={styles.noMargin} | ||
color={lpuColor} | ||
>Wróć do listy | ||
</IoniIcons.Button> | ||
<IoniIcons.Button | ||
name="open-outline" | ||
onPress={() => Linking.openURL(content.id)} | ||
backgroundColor={transparent} | ||
underlayColor={transparent} | ||
size={30} | ||
borderRadius={0} | ||
iconStyle={styles.noMargin} | ||
color={lpuColor} | ||
>Zobacz na stronie | ||
</IoniIcons.Button> | ||
</View> | ||
</SafeAreaView> | ||
) | ||
} | ||
|
||
const htmlStyles = StyleSheet.create({ | ||
p: { | ||
fontSize: 15, | ||
color: textColor, | ||
textAlign: 'justify', | ||
}, | ||
pre: { | ||
fontSize: 15, | ||
color: textColor, | ||
textAlign: 'justify', | ||
}, | ||
marginBottom: 10, | ||
}); | ||
|
||
const styles = StyleSheet.create({ | ||
view: { | ||
width: Dev_Width, | ||
flex: 1, | ||
flexDirection: 'column', | ||
backgroundColor: transparent, | ||
justifyContent: 'space-between', | ||
}, | ||
content: { | ||
paddingLeft: 10, | ||
paddingRight: 10, | ||
}, | ||
buttons: { | ||
flexDirection: 'row', | ||
justifyContent: 'space-between', | ||
}, | ||
title: { | ||
color: textColor, | ||
fontSize: 25, | ||
fontWeight: '500', | ||
marginTop: 10, | ||
marginBottom: 10, | ||
}, | ||
news: { | ||
marginTop: 15, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters