Skip to content

Commit 94e51c6

Browse files
committed
implemented using_tabs example
1 parent 081981e commit 94e51c6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1463
-0
lines changed

using_tabs/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.DS_Store
2+
.atom/
3+
.idea
4+
.packages
5+
.pub/
6+
build/
7+
ios/.generated/
8+
packages
9+
pubspec.lock
10+
.flutter-plugins

using_tabs/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# using_tabs
2+
3+
A new Flutter project.
4+
5+
## Getting Started
6+
7+
For help getting started with Flutter, view our online
8+
[documentation](http://flutter.io/).

using_tabs/android/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/workspace.xml
5+
/.idea/libraries
6+
.DS_Store
7+
/build
8+
/captures
9+
GeneratedPluginRegistrant.java

using_tabs/android/app/build.gradle

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
def localProperties = new Properties()
2+
def localPropertiesFile = rootProject.file('local.properties')
3+
if (localPropertiesFile.exists()) {
4+
localPropertiesFile.withInputStream { stream ->
5+
localProperties.load(stream)
6+
}
7+
}
8+
9+
def flutterRoot = localProperties.getProperty('flutter.sdk')
10+
if (flutterRoot == null) {
11+
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12+
}
13+
14+
apply plugin: 'com.android.application'
15+
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
16+
17+
android {
18+
compileSdkVersion 25
19+
buildToolsVersion '25.0.3'
20+
21+
lintOptions {
22+
disable 'InvalidPackage'
23+
}
24+
25+
defaultConfig {
26+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
27+
applicationId "com.yourcompany.usingtabs"
28+
minSdkVersion 16
29+
targetSdkVersion 25
30+
versionCode 1
31+
versionName "1.0"
32+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
33+
}
34+
35+
buildTypes {
36+
release {
37+
// TODO: Add your own signing config for the release build.
38+
// Signing with the debug keys for now, so `flutter run --release` works.
39+
signingConfig signingConfigs.debug
40+
}
41+
}
42+
}
43+
44+
flutter {
45+
source '../..'
46+
}
47+
48+
dependencies {
49+
androidTestCompile 'com.android.support:support-annotations:25.4.0'
50+
androidTestCompile 'com.android.support.test:runner:0.5'
51+
androidTestCompile 'com.android.support.test:rules:0.5'
52+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.yourcompany.usingtabs">
3+
4+
<!-- The INTERNET permission is required for development. Specifically,
5+
flutter needs it to communicate with the running application
6+
to allow setting breakpoints, to provide hot reload, etc.
7+
-->
8+
<uses-permission android:name="android.permission.INTERNET"/>
9+
10+
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
11+
calls FlutterMain.startInitialization(this); in its onCreate method.
12+
In most cases you can leave this as-is, but you if you want to provide
13+
additional functionality it is fine to subclass or reimplement
14+
FlutterApplication and put your custom class here. -->
15+
<application android:name="io.flutter.app.FlutterApplication" android:label="using_tabs" android:icon="@mipmap/ic_launcher">
16+
<activity android:name=".MainActivity"
17+
android:launchMode="singleTop"
18+
android:theme="@android:style/Theme.Black.NoTitleBar"
19+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection"
20+
android:hardwareAccelerated="true"
21+
android:windowSoftInputMode="adjustResize">
22+
<intent-filter>
23+
<action android:name="android.intent.action.MAIN"/>
24+
<category android:name="android.intent.category.LAUNCHER"/>
25+
</intent-filter>
26+
</activity>
27+
</application>
28+
</manifest>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.yourcompany.usingtabs;
2+
3+
import android.os.Bundle;
4+
5+
import io.flutter.app.FlutterActivity;
6+
import io.flutter.plugins.GeneratedPluginRegistrant;
7+
8+
public class MainActivity extends FlutterActivity {
9+
@Override
10+
protected void onCreate(Bundle savedInstanceState) {
11+
super.onCreate(savedInstanceState);
12+
GeneratedPluginRegistrant.registerWith(this);
13+
}
14+
}
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)