Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design2
/
2011104505
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
박정현
2020-06-14 19:13:30 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
95453aea6c41ae8258a938948e0ebd8344d6dab7
95453aea
1 parent
a455c0bb
테스트 버튼 추가
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
2 deletions
talktalkspeak-test.apk
talktalkspeak2/app/src/main/java/com/example/talktalkspeak/MainActivity.java
talktalkspeak2/app/src/main/res/drawable/play.png
talktalkspeak2/app/src/main/res/layout/activity_main.xml
talktalkspeak-test.apk
0 → 100644
View file @
95453ae
No preview for this file type
talktalkspeak2/app/src/main/java/com/example/talktalkspeak/MainActivity.java
View file @
95453ae
...
...
@@ -34,6 +34,9 @@ import java.util.Set;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
android.telephony.SmsManager
;
import
org.w3c.dom.Text
;
import
java.util.Date
;
public
class
MainActivity
extends
AppCompatActivity
implements
TextToSpeech
.
OnInitListener
{
...
...
@@ -62,6 +65,7 @@ public class MainActivity extends AppCompatActivity implements TextToSpeech.OnIn
private
Button
button3
;
private
Button
button4
;
private
Button
button5
;
private
Button
button6
;
public
TextView
deviceview
;
private
TextView
editText
;
...
...
@@ -110,6 +114,7 @@ public class MainActivity extends AppCompatActivity implements TextToSpeech.OnIn
this
.
button3
=
(
Button
)
findViewById
(
R
.
id
.
button3
);
this
.
button4
=
(
Button
)
findViewById
(
R
.
id
.
button4
);
this
.
button5
=
(
Button
)
findViewById
(
R
.
id
.
button5
);
this
.
button6
=
(
Button
)
findViewById
(
R
.
id
.
button6
);
this
.
spinner
=
(
Spinner
)
findViewById
(
R
.
id
.
spinner
);
spinner
.
setSelection
(
2
);
this
.
spinner2
=
(
Spinner
)
findViewById
(
R
.
id
.
spinner2
);
...
...
@@ -166,6 +171,13 @@ public class MainActivity extends AppCompatActivity implements TextToSpeech.OnIn
}
});
this
.
button6
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
public
void
onClick
(
View
view
)
{
String
test
=
"테스트입니다. 목소리 톤과 속도를 알맞게 조정해 주세요."
;
TextToSpeech
(
test
);
}
});
//TTS 속도조정
this
.
spinner
.
setOnItemSelectedListener
(
new
AdapterView
.
OnItemSelectedListener
()
{
public
void
onItemSelected
(
AdapterView
<?>
parent
,
View
view
,
int
position
,
long
id
)
{
...
...
@@ -265,6 +277,7 @@ public class MainActivity extends AppCompatActivity implements TextToSpeech.OnIn
private
void
initializeKakaoReceiver
()
{
this
.
kakaoReceiver
=
new
BroadcastReceiver
()
{
public
void
onReceive
(
Context
context
,
Intent
intent
)
{
...
...
talktalkspeak2/app/src/main/res/drawable/play.png
0 → 100644
View file @
95453ae
13.1 KB
talktalkspeak2/app/src/main/res/layout/activity_main.xml
View file @
95453ae
...
...
@@ -50,7 +50,7 @@
<Button
android:id=
"@+id/button3"
android:layout_width=
"50dp"
android:layout_height=
"
4
0dp"
android:layout_height=
"
5
0dp"
android:layout_gravity=
"right|center_vertical|center_horizontal|center"
android:layout_marginRight=
"10dp"
android:background=
"@drawable/on"
...
...
@@ -88,7 +88,7 @@
<Button
android:id=
"@+id/button5"
android:layout_width=
"50dp"
android:layout_height=
"
4
0dp"
android:layout_height=
"
5
0dp"
android:layout_gravity=
"right|center_vertical|center_horizontal|center"
android:layout_marginRight=
"10dp"
android:background=
"@drawable/on"
...
...
@@ -125,6 +125,20 @@
<TextView
android:textSize=
"20sp"
android:textStyle=
"bold"
android:textColor=
"@android:color/black"
android:gravity=
"left|center_vertical|center_horizontal|center"
android:id=
"@+id/textView42"
android:background=
"#FFFFFF"
android:paddingLeft=
"10dp"
android:layout_width=
"match_parent"
android:layout_height=
"60dp"
android:text=
"톤 설정"
/>
<Spinner
android:entries=
"@array/톤"
android:layout_gravity=
"right|center_vertical|center_horizontal|center"
android:id=
"@+id/spinner3"
android:layout_width=
"200dp"
android:layout_height=
"match_parent"
/>
</FrameLayout>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<TextView
android:textSize=
"20sp"
android:textStyle=
"bold"
android:textColor=
"@android:color/black"
android:gravity=
"left|center_vertical|center_horizontal|center"
android:id=
"@+id/textView43"
android:background=
"#FFFFFF"
android:paddingLeft=
"10dp"
android:layout_width=
"match_parent"
android:layout_height=
"60dp"
android:text=
"음성 테스트"
/>
<Button
android:id=
"@+id/button6"
style=
"@style/Widget.AppCompat.Button.Borderless"
android:layout_width=
"50dp"
android:layout_height=
"50dp"
android:layout_gravity=
"right|center_vertical|center_horizontal|center"
android:layout_marginRight=
"80dp"
android:background=
"@drawable/play"
app:layout_constraintHorizontal_bias=
"0.95"
app:layout_constraintVertical_bias=
"0.289"
/>
</FrameLayout>
<TextView
android:id=
"@+id/textView5"
...
...
Please
register
or
login
to post a comment