Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
likorn
/
vocabulary_notebook
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c53a7d01
authored
Sep 11, 2018
by
Paktalin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed fonts and text color
parent
5c782835
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
41 additions
and
18 deletions
app/src/main/java/com/paktalin/vocabularynotebook/VocabularyAdapter.kt
app/src/main/java/com/paktalin/vocabularynotebook/ui/WordInfoFragment.kt
app/src/main/res/font/fonts.xml
app/src/main/res/font/gamjaflower.ttf
app/src/main/res/layout/activity_word_info.xml
app/src/main/res/layout/fragment_new_word.xml
app/src/main/res/layout/word_item.xml
app/src/main/java/com/paktalin/vocabularynotebook/VocabularyAdapter.kt
View file @
c53a7d01
...
...
@@ -4,10 +4,13 @@ import android.app.Activity
import
android.content.Intent
import
android.support.v7.widget.PopupMenu
import
android.support.v7.widget.RecyclerView
import
android.util.Log
import
android.view.*
import
android.widget.ImageButton
import
android.widget.LinearLayout
import
android.widget.TextView
import
com.paktalin.vocabularynotebook.ui.MainActivity
import
com.paktalin.vocabularynotebook.ui.WordInfoFragment
import
com.paktalin.vocabularynotebook.ui.WordItemInfoActivity
class
VocabularyAdapter
(
private
val
wordItems
:
MutableList
<
WordItem
>,
private
val
context
:
Activity
)
:
RecyclerView
.
Adapter
<
VocabularyAdapter
.
ViewHolder
>()
{
...
...
@@ -36,9 +39,13 @@ class VocabularyAdapter(private val wordItems: MutableList<WordItem>, private va
override
fun
getItemCount
():
Int
{
return
wordItems
.
size
}
private
fun
openWordItemInfo
(
wordItem
:
WordItem
)
{
val
intentWordItemInfo
=
Intent
(
context
,
WordItemInfoActivity
::
class
.
java
)
/*
val intentWordItemInfo = Intent(context, WordItemInfoActivity::class.java)
intentWordItemInfo.putExtra("wordItem", wordItem)
context
.
startActivity
(
intentWordItemInfo
)
context.startActivity(intentWordItemInfo)*/
Log
.
d
(
TAG
,
"starting transaction"
)
//todo start word info fragment
/*(context as MainActivity).supportFragmentManager.beginTransaction().add(R.id.for_fragment, WordInfoFragment()).commit()*/
}
private
fun
showPopupMenu
(
v
:
View
,
position
:
Int
)
{
...
...
app/src/main/java/com/paktalin/vocabularynotebook/ui/WordInfoFragment.kt
0 → 100644
View file @
c53a7d01
package
com.paktalin.vocabularynotebook.ui
import
android.os.Bundle
import
android.support.v4.app.Fragment
import
android.util.Log
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
com.paktalin.vocabularynotebook.R
class
WordInfoFragment
:
Fragment
()
{
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?):
View
?
{
Log
.
d
(
"TTT"
,
"onCreateView"
)
return
inflater
.
inflate
(
R
.
layout
.
activity_word_info
,
container
,
false
)
}
}
\ No newline at end of file
app/src/main/res/font/fonts.xml
deleted
100644 → 0
View file @
5c782835
<?xml version="1.0" encoding="utf-8"?>
<font-family
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<font
app:font=
"@font/gamjaflower"
/>
<font
app:font=
"@font/neucha"
/>
</font-family>
\ No newline at end of file
app/src/main/res/font/gamjaflower.ttf
deleted
100644 → 0
View file @
5c782835
File deleted
app/src/main/res/layout/activity_word_info.xml
View file @
c53a7d01
...
...
@@ -2,8 +2,9 @@
<android.support.constraint.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_width=
"250dp"
android:layout_height=
"180dp"
android:layout_gravity=
"center"
>
<TextView
android:id=
"@+id/etWord"
...
...
app/src/main/res/layout/fragment_new_word.xml
View file @
c53a7d01
...
...
@@ -41,7 +41,8 @@
android:hint=
"@string/hint_new_word"
android:inputType=
"text"
android:textSize=
"22sp"
app:fontFamily=
"@font/fonts"
app:fontFamily=
"@font/neucha"
android:textColor=
"#000F55"
tools:ignore=
"LabelFor"
/>
<EditText
...
...
@@ -53,7 +54,8 @@
android:hint=
"@string/hint_translation"
android:inputType=
"text"
android:textSize=
"22sp"
app:fontFamily=
"@font/fonts"
app:fontFamily=
"@font/neucha"
android:textColor=
"#000F55"
tools:ignore=
"LabelFor"
/>
</LinearLayout>
...
...
app/src/main/res/layout/word_item.xml
View file @
c53a7d01
...
...
@@ -18,7 +18,8 @@
android:layout_marginRight=
"8dp"
android:layout_marginEnd=
"8dp"
android:layout_marginLeft=
"8dp"
android:layout_marginStart=
"8dp"
/>
android:layout_marginStart=
"8dp"
tools:ignore=
"ContentDescription"
/>
<LinearLayout
android:id=
"@+id/tableLayout"
...
...
@@ -39,7 +40,8 @@
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:textSize=
"22sp"
app:fontFamily=
"@font/fonts"
app:fontFamily=
"@font/neucha"
android:textColor=
"#000F55"
tools:ignore=
"LabelFor"
/>
<TextView
...
...
@@ -48,7 +50,8 @@
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:textSize=
"22sp"
app:fontFamily=
"@font/fonts"
app:fontFamily=
"@font/neucha"
android:textColor=
"#000F55"
tools:ignore=
"LabelFor"
/>
</LinearLayout>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment