Skip to content

Instantly share code, notes, and snippets.

import React, {Component} from ‘react’;
import {AppRegistry,View}from ‘react - native’;
export default class FlexDirectionBasics extends Component {
render() {
return (
<View style = {
{
flex: 1,
flexDirection: ‘column’
render() {
return (
<View style = {
{
flex: 1,
flexDirection: ‘column’,
justifyContent: ’center’
}
} >
//changed justifyContent value to the flex-start,flex-end,space-between,space-around
render() {
return (
<View style = {
{
flex: 1,
flexDirection: ‘column’,
alignItems: ‘center’,
}
} >
< View style = {{width: 50,height: 50,backgroundColor: ‘powderblue’}} />
render() {
return (
<View style = {{
flex: 1,
flexDirection: ‘column’,
alignItems: ‘stretch’,
}
} >
< View style = {{height: 50,backgroundColor: ‘powderblue’}} />
< View style = {{height: 50,backgroundColor: ‘skyblue’}} />
render() {
return (
< View style = {
{
flex: 1,
flexDirection: ‘row’,
justifyContent: ‘center’,
alignItems: ‘center’, //changed value of alignItems
}
} >
render() {
return (
< View style = {
{
flex: 1,
flexDirection: ‘row’,
justifyContent: ‘center’,
alignItems: ‘stretch’,
}
} >
@dharavp
dharavp / Software set up to run or create an android app
Created October 13, 2017 05:56
Set up documentation for software which need to run an android app. This Documentation is include set up steps for git,android studio, genymotion, virtual Box in Ubuntu.
Commmand To install git
step:1 sudo apt-get update
step:2 sudo rm /var/lib/apt/lists/lock
step:3 sudo rm /var/cache/apt/archives/lock
step:4 sudo rm /var/lib/dpkg/lock
step:5 sudo apt-get install git
@dharavp
dharavp / react-native project upload on git
Last active April 19, 2024 13:58
This Document is include to upload react-native project on github in ubantu
Upload React Native Project on Git
Step:1 Create Repository in Git Account
Step:2 Go Into the Folder of your project
Step:3 Initialize git
-> git init
@dharavp
dharavp / react-native-project-setup
Created October 13, 2017 05:46
React-native project setup steps and important library
To init project as a reactnative
-> react-native init firstProject
To Run Project
Inside of your Project Directory
-> react-native run-android
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">