Skip to content

Commit f0c51db

Browse files
committed
initial commit
1 parent 38325f4 commit f0c51db

File tree

19 files changed

+245
-0
lines changed

19 files changed

+245
-0
lines changed

app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 23
5+
buildToolsVersion "24.0.0"
6+
7+
defaultConfig {
8+
applicationId "com.marytts.android.client"
9+
minSdkVersion 21
10+
targetSdkVersion 23
11+
versionCode 1
12+
versionName "1.0"
13+
}
14+
buildTypes {
15+
release {
16+
minifyEnabled false
17+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18+
}
19+
}
20+
}
21+
22+
dependencies {
23+
compile fileTree(dir: 'libs', include: ['*.jar'])
24+
// testCompile 'junit:junit:4.12'
25+
compile 'com.android.support:appcompat-v7:23.4.0'
26+
compile 'com.android.support:design:23.4.0'
27+
// compile 'com.marytts.android:marylib:0.1.2'
28+
}

app/proguard-rules.pro

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in D:\dev\Android\sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}

app/src/main/AndroidManifest.xml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.marytts.android.client">
4+
5+
<application
6+
android:allowBackup="true"
7+
android:icon="@mipmap/ic_launcher"
8+
android:label="@string/app_name"
9+
android:supportsRtl="true"
10+
android:theme="@style/AppTheme">
11+
<activity
12+
android:name=".MainActivity"
13+
android:label="@string/app_name"
14+
android:theme="@style/AppTheme.NoActionBar">
15+
<intent-filter>
16+
<action android:name="android.intent.action.MAIN" />
17+
18+
<category android:name="android.intent.category.LAUNCHER" />
19+
</intent-filter>
20+
</activity>
21+
</application>
22+
23+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
package com.marytts.android.client;
2+
3+
import android.os.Bundle;
4+
import android.support.design.widget.FloatingActionButton;
5+
import android.support.design.widget.Snackbar;
6+
import android.support.v7.app.AppCompatActivity;
7+
import android.support.v7.widget.Toolbar;
8+
import android.view.View;
9+
import android.view.Menu;
10+
import android.view.MenuItem;
11+
12+
public class MainActivity extends AppCompatActivity {
13+
14+
@Override
15+
protected void onCreate(Bundle savedInstanceState) {
16+
super.onCreate(savedInstanceState);
17+
setContentView(R.layout.activity_main);
18+
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
19+
setSupportActionBar(toolbar);
20+
21+
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
22+
fab.setOnClickListener(new View.OnClickListener() {
23+
@Override
24+
public void onClick(View view) {
25+
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
26+
.setAction("Action", null).show();
27+
}
28+
});
29+
}
30+
31+
@Override
32+
public boolean onCreateOptionsMenu(Menu menu) {
33+
// Inflate the menu; this adds items to the action bar if it is present.
34+
getMenuInflater().inflate(R.menu.menu_main, menu);
35+
return true;
36+
}
37+
38+
@Override
39+
public boolean onOptionsItemSelected(MenuItem item) {
40+
// Handle action bar item clicks here. The action bar will
41+
// automatically handle clicks on the Home/Up button, so long
42+
// as you specify a parent activity in AndroidManifest.xml.
43+
int id = item.getItemId();
44+
45+
//noinspection SimplifiableIfStatement
46+
if (id == R.id.action_settings) {
47+
return true;
48+
}
49+
50+
return super.onOptionsItemSelected(item);
51+
}
52+
}
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
xmlns:tools="http://schemas.android.com/tools"
5+
android:layout_width="match_parent"
6+
android:layout_height="match_parent"
7+
android:fitsSystemWindows="true"
8+
tools:context="com.marytts.android.client.MainActivity">
9+
10+
<android.support.design.widget.AppBarLayout
11+
android:layout_width="match_parent"
12+
android:layout_height="wrap_content"
13+
android:theme="@style/AppTheme.AppBarOverlay">
14+
15+
<android.support.v7.widget.Toolbar
16+
android:id="@+id/toolbar"
17+
android:layout_width="match_parent"
18+
android:layout_height="?attr/actionBarSize"
19+
android:background="?attr/colorPrimary"
20+
app:popupTheme="@style/AppTheme.PopupOverlay" />
21+
22+
</android.support.design.widget.AppBarLayout>
23+
24+
<include layout="@layout/content_main" />
25+
26+
<android.support.design.widget.FloatingActionButton
27+
android:id="@+id/fab"
28+
android:layout_width="wrap_content"
29+
android:layout_height="wrap_content"
30+
android:layout_gravity="bottom|center"
31+
android:layout_margin="@dimen/fab_margin"
32+
android:src="@android:drawable/ic_lock_silent_mode_off" />
33+
34+
</android.support.design.widget.CoordinatorLayout>
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
xmlns:tools="http://schemas.android.com/tools"
5+
android:layout_width="match_parent"
6+
android:layout_height="match_parent"
7+
android:paddingBottom="@dimen/activity_vertical_margin"
8+
android:paddingLeft="@dimen/activity_horizontal_margin"
9+
android:paddingRight="@dimen/activity_horizontal_margin"
10+
android:paddingTop="@dimen/activity_vertical_margin"
11+
app:layout_behavior="@string/appbar_scrolling_view_behavior"
12+
tools:context="com.marytts.android.client.MainActivity"
13+
tools:showIn="@layout/activity_main"
14+
android:id="@+id/btnTextToSpeech">
15+
16+
<TextView
17+
android:layout_width="wrap_content"
18+
android:layout_height="wrap_content"
19+
android:text="Write here text to speech"
20+
android:id="@+id/textView" />
21+
22+
<EditText
23+
android:layout_width="wrap_content"
24+
android:layout_height="wrap_content"
25+
android:id="@+id/editTtsText"
26+
android:layout_below="@+id/textView"
27+
android:layout_alignParentStart="true"
28+
android:layout_alignParentEnd="true" />
29+
</RelativeLayout>

app/src/main/res/menu/menu_main.xml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<menu xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:app="http://schemas.android.com/apk/res-auto"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
tools:context="com.marytts.android.client.MainActivity">
5+
<item
6+
android:id="@+id/action_settings"
7+
android:orderInCategory="100"
8+
android:title="@string/action_about"
9+
app:showAsAction="never" />
10+
</menu>
4.2 KB
Loading
2.91 KB
Loading
6.45 KB
Loading
Loading
Loading
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<resources>
2+
3+
<style name="AppTheme.NoActionBar">
4+
<item name="windowActionBar">false</item>
5+
<item name="windowNoTitle">true</item>
6+
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
7+
<item name="android:statusBarColor">@android:color/transparent</item>
8+
</style>
9+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<resources>
2+
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
3+
(such as screen margins) for screens with more than 820dp of available width. This
4+
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
5+
<dimen name="activity_horizontal_margin">64dp</dimen>
6+
</resources>

app/src/main/res/values/colors.xml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="colorPrimary">#3F51B5</color>
4+
<color name="colorPrimaryDark">#303F9F</color>
5+
<color name="colorAccent">#FF4081</color>
6+
</resources>

app/src/main/res/values/dimens.xml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<resources>
2+
<!-- Default screen margins, per the Android Design guidelines. -->
3+
<dimen name="activity_horizontal_margin">16dp</dimen>
4+
<dimen name="activity_vertical_margin">16dp</dimen>
5+
<dimen name="fab_margin">16dp</dimen>
6+
</resources>

app/src/main/res/values/strings.xml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<resources>
2+
<string name="app_name">Demo MaryTTS Client</string>
3+
<string name="action_about">About</string>
4+
</resources>

app/src/main/res/values/styles.xml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<resources>
2+
3+
<!-- Base application theme. -->
4+
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
5+
<!-- Customize your theme here. -->
6+
<item name="colorPrimary">@color/colorPrimary</item>
7+
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
8+
<item name="colorAccent">@color/colorAccent</item>
9+
</style>
10+
11+
<style name="AppTheme.NoActionBar">
12+
<item name="windowActionBar">false</item>
13+
<item name="windowNoTitle">true</item>
14+
</style>
15+
16+
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
17+
18+
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
19+
20+
</resources>

0 commit comments

Comments
 (0)