Toggle navigation
Toggle navigation
This project
Loading...
Sign in
신기성
/
WELLO
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Authored by
soonmyeong2
2019-11-04 22:27:36 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e341fdb135812cb266ab95eb7c8afbe8a2244899
e341fdb1
1 parent
81735308
search menu redesinged
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
68 additions
and
20 deletions
.gitignore
subscribeToTopic.py
vip/app/src/main/AndroidManifest.xml
vip/app/src/main/java/com/example/vip/MainActivity.kt
vip/app/src/main/java/com/example/vip/SearchActivity.kt
vip/app/src/main/java/com/example/vip/SignUpActivity.kt
vip/app/src/main/res/drawable/splash_main.jpg
vip/app/src/main/res/drawable/splash_main.png
vip/app/src/main/res/layout/search.xml
.gitignore
0 → 100644
View file @
e341fdb
wello_firebase_SDKKey.json
\ No newline at end of file
subscribeToTopic.py
0 → 100644
View file @
e341fdb
import
firebase_admin
from
firebase_admin
import
credentials
from
firebase_admin
import
messaging
cred
=
credentials
.
Certificate
(
"./wello_firebase_SDKKey.json"
)
wello
=
firebase_admin
.
initialize_app
(
cred
)
print
(
"WELLO project name : "
,
wello
.
project_id
)
# These registration tokens come from the client FCM SDKs.
registration_tokens
=
[
"eSNbW5he2RA:APA91bHqe2ir6xeYq-R143J3pmAD1KuYuPqa-_3oHIw93hQKe9nMGZ2Ol3foV9GXciZCP8WHUbfIEb7Ymr-BGSl22Tau_mvOSqVTqNP5V2UU8sbOjZm9TgBxirxy-A0KynHxKCLcMnYF"
"dJCm74G7qY0:APA91bGydGRjb91_bX6X8Oyx0kqyFHoXzgF0ZZmD_IygEDCqYPHxJ46os8sHytEmHWIpASDzTk-RZESgkZvdcJavKLJWtVY5uxWl2xUEPefyrcJ-kLWnLHcgPbDTCVLoGe_ZivOFuY9Y"
]
# Subscribe the devices corresponding to the registration tokens to the
# topic.
response
=
messaging
.
subscribe_to_topic
(
registration_tokens
,
"kisung"
)
# See the TopicManagementResponse reference documentation
# for the contents of response.
print
(
response
.
success_count
,
'tokens were subscribed successfully'
)
vip/app/src/main/AndroidManifest.xml
View file @
e341fdb
...
...
@@ -19,10 +19,9 @@
android:theme=
"@style/SplashTheme"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
</application>
</manifest>
</manifest>
\ No newline at end of file
...
...
vip/app/src/main/java/com/example/vip/MainActivity.kt
View file @
e341fdb
...
...
@@ -47,7 +47,6 @@ class MainActivity : AppCompatActivity() {
emailSigninBtn
.
setOnClickListener
{
loginEmail
()
}
emailSignupBtn
.
setOnClickListener
{
...
...
vip/app/src/main/java/com/example/vip/SearchActivity.kt
View file @
e341fdb
package
com.example.vip
import
android.content.Context
import
android.os.Bundle
import
androidx.appcompat.app.AppCompatActivity
//import androidx.appcompat.widget.SearchView
import
android.widget.SearchView
import
android.widget.Toast
import
androidx.core.app.ComponentActivity.ExtraData
import
androidx.core.content.ContextCompat.getSystemService
import
android.icu.lang.UCharacter.GraphemeClusterBreak.T
import
android.view.View
import
android.widget.Button
import
android.content.Intent
import
android.util.Log
import
android.view.inputmethod.InputMethodManager
import
androidx.core.content.ContextCompat
import
com.google.firebase.database.*
import
com.google.firebase.database.DatabaseReference
import
com.google.firebase.database.FirebaseDatabase
import
kotlinx.android.synthetic.main.search.*
import
androidx.core.app.ComponentActivity.ExtraData
import
androidx.core.content.ContextCompat.getSystemService
import
android.icu.lang.UCharacter.GraphemeClusterBreak.T
...
...
@@ -30,6 +33,13 @@ data class MemoItem(
var
database
=
FirebaseDatabase
.
getInstance
().
reference
class
SearchActivity
:
AppCompatActivity
()
{
fun
View
.
hideKeyboard
()
{
val
imm
=
context
.
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
)
as
InputMethodManager
imm
.
hideSoftInputFromWindow
(
windowToken
,
0
)
}
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
search
)
...
...
@@ -45,6 +55,10 @@ class SearchActivity : AppCompatActivity() {
override
fun
onQueryTextSubmit
(
query
:
String
):
Boolean
{
// 검색 버튼이 눌러졌을 때 이벤트 처리
//버튼 눌를때 아래 삭제
view
.
hideKeyboard
()
view
.
visibility
=
View
.
GONE
database
.
orderByChild
(
"Policy"
).
startAt
(
"$query"
).
endAt
(
"$query"
+
"\uf8ff"
).
addListenerForSingleValueEvent
(
object
:
ValueEventListener
{
override
fun
onCancelled
(
p0
:
DatabaseError
)
{
Toast
.
makeText
(
this
@SearchActivity
,
"실패부분 : $query"
,
Toast
.
LENGTH_SHORT
).
show
()
...
...
vip/app/src/main/java/com/example/vip/SignUpActivity.kt
View file @
e341fdb
...
...
@@ -41,8 +41,6 @@ class SignUpActivity : AppCompatActivity() {
}
}
//pushing code end
}
//pushing code start 2
...
...
vip/app/src/main/res/drawable/splash_main.jpg
0 → 100644
View file @
e341fdb
31.9 KB
vip/app/src/main/res/drawable/splash_main.png
deleted
100644 → 0
View file @
8173530
24.5 KB
vip/app/src/main/res/layout/search.xml
View file @
e341fdb
<?xml version="1.0" encoding="utf-8"?>
<
Linear
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Relative
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<SearchView
android:id=
"@+id/searchForm"
android:queryHint=
"복지 정책 입력"
app:showAsAction=
"always"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
</SearchView
>
android:layout_height=
"wrap_content"
android:queryHint=
"복지 정책 입력"
app:showAsAction=
"always"
/
>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/searchRecyclerView"
android:layout_width=
"match_parent"
android:layout_height=
"340dp"
android:layout_height=
"668dp"
android:layout_above=
"@+id/view"
android:layout_below=
"@+id/searchForm"
android:layout_alignParentStart=
"true"
android:layout_marginStart=
"0dp"
android:layout_marginTop=
"15dp"
android:layout_marginBottom=
"-320dp"
app:layoutManager=
"androidx.recyclerview.widget.LinearLayoutManager"
app:spanCount=
"3"
app:layout_constraintBottom_toBottomOf=
"@id/bottom_navigation"
tools:listitem=
"@layout/item_search"
/>
</LinearLayout>
\ No newline at end of file
<View
android:id=
"@+id/view"
android:layout_width=
"match_parent"
android:layout_height=
"320dp"
android:layout_alignParentStart=
"true"
android:layout_alignParentBottom=
"true"
android:layout_marginStart=
"0dp"
android:background=
"#8029ABE2"
app:layout_constraintStart_toStartOf=
"@id/searchRecyclerView"
app:layout_constraintTop_toTopOf=
"@id/searchRecyclerView"
/>
</RelativeLayout>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment