Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Game Client Android
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
25
Issues
25
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Akamu
Game Client Android
Commits
1de63587
Commit
1de63587
authored
Sep 22, 2020
by
Niklas Fix
🎓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement
#14
parent
c70fc6b0
Pipeline
#1972
failed with stages
in 76 minutes and 34 seconds
Changes
17
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
104 additions
and
13 deletions
+104
-13
.idea/assetWizardSettings.xml
.idea/assetWizardSettings.xml
+3
-3
app/src/main/AndroidManifest.xml
app/src/main/AndroidManifest.xml
+1
-1
app/src/main/java/de/akamu/tudarmstadt/data/duel/DuelDataSourceImpl.kt
...java/de/akamu/tudarmstadt/data/duel/DuelDataSourceImpl.kt
+4
-0
app/src/main/java/de/akamu/tudarmstadt/features/dashboard/MainActivity.kt
...a/de/akamu/tudarmstadt/features/dashboard/MainActivity.kt
+1
-7
app/src/main/java/de/akamu/tudarmstadt/features/profile/ProfileActivity.kt
.../de/akamu/tudarmstadt/features/profile/ProfileActivity.kt
+7
-0
app/src/main/java/de/akamu/tudarmstadt/features/profile/ProfileContract.kt
.../de/akamu/tudarmstadt/features/profile/ProfileContract.kt
+11
-0
app/src/main/java/de/akamu/tudarmstadt/features/profile/ProfilePresenter.kt
...de/akamu/tudarmstadt/features/profile/ProfilePresenter.kt
+4
-0
app/src/main/java/de/akamu/tudarmstadt/features/settings/SettingsActivity.kt
...e/akamu/tudarmstadt/features/settings/SettingsActivity.kt
+1
-1
app/src/main/java/de/akamu/tudarmstadt/features/settings/SettingsFragment.kt
...e/akamu/tudarmstadt/features/settings/SettingsFragment.kt
+1
-1
app/src/main/res/drawable-anydpi/ic_chewron_right.xml
app/src/main/res/drawable-anydpi/ic_chewron_right.xml
+11
-0
app/src/main/res/drawable-hdpi/ic_chewron_right.png
app/src/main/res/drawable-hdpi/ic_chewron_right.png
+0
-0
app/src/main/res/drawable-mdpi/ic_chewron_right.png
app/src/main/res/drawable-mdpi/ic_chewron_right.png
+0
-0
app/src/main/res/drawable-xhdpi/ic_chewron_right.png
app/src/main/res/drawable-xhdpi/ic_chewron_right.png
+0
-0
app/src/main/res/drawable-xxhdpi/ic_chewron_right.png
app/src/main/res/drawable-xxhdpi/ic_chewron_right.png
+0
-0
app/src/main/res/layout/content_profile.xml
app/src/main/res/layout/content_profile.xml
+57
-0
app/src/main/res/values-en/strings.xml
app/src/main/res/values-en/strings.xml
+1
-0
app/src/main/res/values/strings.xml
app/src/main/res/values/strings.xml
+2
-0
No files found.
.idea/assetWizardSettings.xml
View file @
1de63587
...
...
@@ -24,7 +24,7 @@
<option
name=
"values"
>
<map>
<entry
key=
"color"
value=
"000000"
/>
<entry
key=
"imagePath"
value=
"C:\Users\Niklas\AppData\Local\Temp\baseline_c
ode
_24.xml"
/>
<entry
key=
"imagePath"
value=
"C:\Users\Niklas\AppData\Local\Temp\baseline_c
hevron_right
_24.xml"
/>
<entry
key=
"opacityPercent"
value=
"80"
/>
</map>
</option>
...
...
@@ -36,7 +36,7 @@
<PersistentState>
<option
name=
"values"
>
<map>
<entry
key=
"url"
value=
"jar:file:/C:/Android/Android%20Studio/plugins/android/lib/android.jar!/images/material/icons/materialicons/c
ode/baseline_code
_24.xml"
/>
<entry
key=
"url"
value=
"jar:file:/C:/Android/Android%20Studio/plugins/android/lib/android.jar!/images/material/icons/materialicons/c
hevron_right/baseline_chevron_right
_24.xml"
/>
</map>
</option>
</PersistentState>
...
...
@@ -68,7 +68,7 @@
</option>
<option
name=
"values"
>
<map>
<entry
key=
"outputName"
value=
"ic_c
ode
"
/>
<entry
key=
"outputName"
value=
"ic_c
hewron_right
"
/>
<entry
key=
"theme"
value=
"CUSTOM"
/>
<entry
key=
"themeColor"
value=
"000000"
/>
</map>
...
...
app/src/main/AndroidManifest.xml
View file @
1de63587
...
...
@@ -62,7 +62,7 @@
android:screenOrientation=
"portrait"
android:windowSoftInputMode=
"adjustResize"
/>
<activity
android:name=
"
.features.dashboard
.settings.SettingsActivity"
android:name=
"
de.akamu.tudarmstadt.features
.settings.SettingsActivity"
android:label=
"@string/title_activity_settings"
android:parentActivityName=
".features.dashboard.MainActivity"
android:screenOrientation=
"portrait"
/>
...
...
app/src/main/java/de/akamu/tudarmstadt/data/duel/DuelDataSourceImpl.kt
View file @
1de63587
...
...
@@ -2,6 +2,7 @@ package de.akamu.tudarmstadt.data.duel
import
android.os.AsyncTask
import
de.akamu.tudarmstadt.api.V2APIDuel
import
de.akamu.tudarmstadt.exceptions.AkamuAPIException
import
de.akamu.tudarmstadt.model.Duel
import
de.akamu.tudarmstadt.model.Pool
import
de.akamu.tudarmstadt.model.Round
...
...
@@ -153,6 +154,9 @@ class DuelDataSourceImpl : DuelDataSource {
return
try
{
V2APIDuel
.
submitOptionAnswer
(
roundID
,
questionID
,
selected
)
true
}
catch
(
ae
:
AkamuAPIException
)
{
errorMessage
=
ae
.
message
!!
ae
.
code
==
403
}
catch
(
e
:
Exception
)
{
errorMessage
=
e
.
message
!!
false
...
...
app/src/main/java/de/akamu/tudarmstadt/features/dashboard/MainActivity.kt
View file @
1de63587
...
...
@@ -2,16 +2,10 @@ package de.akamu.tudarmstadt.features.dashboard
import
android.content.Intent
import
android.os.Bundle
import
android.os.Handler
import
android.util.Log
import
android.view.View
import
android.widget.Toast
import
androidx.core.content.ContextCompat
import
androidx.fragment.app.FragmentTransaction
import
com.bumptech.glide.Glide
import
com.bumptech.glide.request.RequestOptions
import
com.google.android.gms.tasks.OnCompleteListener
import
com.google.firebase.iid.FirebaseInstanceId
import
de.akamu.tudarmstadt.BaseActivity
import
de.akamu.tudarmstadt.R
import
de.akamu.tudarmstadt.custom.NextLevelReachedAnimation
...
...
@@ -19,7 +13,7 @@ import de.akamu.tudarmstadt.custom.ProgressBarAddNewPointsAnimation
import
de.akamu.tudarmstadt.data.user.UserDataSourceImpl
import
de.akamu.tudarmstadt.features.dashboard.duels.DuelListFragment
import
de.akamu.tudarmstadt.features.dashboard.memorystore.MemoryStoreFragment
import
de.akamu.tudarmstadt.features.
dashboard.
settings.SettingsActivity
import
de.akamu.tudarmstadt.features.settings.SettingsActivity
import
de.akamu.tudarmstadt.features.dashboard.training.TrainingFragment
import
de.akamu.tudarmstadt.features.login.LoginActivity
import
de.akamu.tudarmstadt.features.profile.ProfileActivity
...
...
app/src/main/java/de/akamu/tudarmstadt/features/profile/ProfileActivity.kt
View file @
1de63587
...
...
@@ -12,6 +12,7 @@ import com.google.android.material.snackbar.Snackbar
import
de.akamu.tudarmstadt.BaseActivity
import
de.akamu.tudarmstadt.R
import
de.akamu.tudarmstadt.data.user.UserDataSourceImpl
import
de.akamu.tudarmstadt.features.settings.SettingsActivity
import
de.akamu.tudarmstadt.features.login.LoginActivity
import
de.akamu.tudarmstadt.features.password.ChangePasswordActivity
import
de.akamu.tudarmstadt.features.questionpools.QuestionPoolsActivity
...
...
@@ -51,6 +52,8 @@ class ProfileActivity : BaseActivity(), ProfileContract.View, AvatarBottomSheetF
change_title_edit
.
setOnClickListener
{
presenter
.
startChangeTitle
()
}
change_subjects_btn
.
setOnClickListener
{
presenter
.
startQuestionPoolsActivity
()
}
change_password_btn
.
setOnClickListener
{
presenter
.
startChangePassword
()
}
app_settings_btn
.
setOnClickListener
{
presenter
.
startAppSettings
()
}
app_settings_edit
.
setOnClickListener
{
presenter
.
startAppSettings
()
}
useravatar_profile
.
setOnClickListener
{
showBottomSheet
()
}
useravatar_edit_profile
.
setOnClickListener
{
showBottomSheet
()
}
}
...
...
@@ -79,6 +82,10 @@ class ProfileActivity : BaseActivity(), ProfileContract.View, AvatarBottomSheetF
startActivity
(
Intent
(
this
,
ChangePasswordActivity
::
class
.
java
))
}
override
fun
navigateToAppSettings
()
{
startActivity
(
Intent
(
this
,
SettingsActivity
::
class
.
java
))
}
/**
* Fill the profile screen with the user's information
*/
...
...
app/src/main/java/de/akamu/tudarmstadt/features/profile/ProfileContract.kt
View file @
1de63587
...
...
@@ -34,6 +34,11 @@ interface ProfileContract {
*/
fun
navigateToLogin
()
/**
* Start the AkamuPreferencesActivity
*/
fun
navigateToAppSettings
()
/**
* Let the user know that loading all avatars failed due to [reason]
*
...
...
@@ -92,6 +97,12 @@ interface ProfileContract {
*/
fun
startChangePassword
()
/**
* Start the AkamuPreferencesActivity
*
*/
fun
startAppSettings
()
/**
* Updates the user in the server
*
...
...
app/src/main/java/de/akamu/tudarmstadt/features/profile/ProfilePresenter.kt
View file @
1de63587
...
...
@@ -33,6 +33,10 @@ class ProfilePresenter(private var view: ProfileContract.View?, private val inte
view
?.
navigateToChangePassword
()
}
override
fun
startAppSettings
()
{
view
?.
navigateToAppSettings
()
}
override
fun
updateUserInServer
(
user
:
User
)
{
interactor
.
updateUserInServer
(
user
,
object
:
UserDataSource
.
UpdateUserCallback
{
override
fun
onUpdateUserSuccess
()
{
...
...
app/src/main/java/de/akamu/tudarmstadt/features/
dashboard/
settings/SettingsActivity.kt
→
app/src/main/java/de/akamu/tudarmstadt/features/settings/SettingsActivity.kt
View file @
1de63587
package
de.akamu.tudarmstadt.features.
dashboard.
settings
package
de.akamu.tudarmstadt.features.settings
import
android.os.Bundle
import
android.view.MenuItem
...
...
app/src/main/java/de/akamu/tudarmstadt/features/
dashboard/
settings/SettingsFragment.kt
→
app/src/main/java/de/akamu/tudarmstadt/features/settings/SettingsFragment.kt
View file @
1de63587
package
de.akamu.tudarmstadt.features.
dashboard.
settings
package
de.akamu.tudarmstadt.features.settings
import
android.content.Intent
import
android.os.Bundle
...
...
app/src/main/res/drawable-anydpi/ic_chewron_right.xml
0 → 100644
View file @
1de63587
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24"
android:viewportHeight=
"24"
android:tint=
"#000000"
android:alpha=
"0.8"
>
<path
android:fillColor=
"@android:color/white"
android:pathData=
"M10,6L8.59,7.41 13.17,12l-4.58,4.59L10,18l6,-6z"
/>
</vector>
app/src/main/res/drawable-hdpi/ic_chewron_right.png
0 → 100644
View file @
1de63587
123 Bytes
app/src/main/res/drawable-mdpi/ic_chewron_right.png
0 → 100644
View file @
1de63587
114 Bytes
app/src/main/res/drawable-xhdpi/ic_chewron_right.png
0 → 100644
View file @
1de63587
152 Bytes
app/src/main/res/drawable-xxhdpi/ic_chewron_right.png
0 → 100644
View file @
1de63587
188 Bytes
app/src/main/res/layout/content_profile.xml
View file @
1de63587
...
...
@@ -301,6 +301,63 @@
android:id=
"@+id/sep6"
style=
"@style/Divider"
/>
<TextView
android:id=
"@+id/title_more"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"@dimen/activity_margin_top"
android:layout_marginTop=
"32dp"
android:layout_marginBottom=
"@dimen/profile_section_title"
android:text=
"@string/more"
android:textColor=
"#aaaaaa"
android:textStyle=
"bold"
/>
<View
android:id=
"@+id/sep7"
style=
"@style/Divider"
/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<Button
android:id=
"@+id/app_settings_btn"
style=
"@style/TextButtonRipple"
android:layout_width=
"match_parent"
android:layout_height=
"51dp"
android:background=
"@android:color/transparent"
android:paddingStart=
"@dimen/activity_margin_top"
android:paddingEnd=
"@dimen/activity_margin_top"
android:text=
"@string/app_settings"
android:textAlignment=
"textStart"
android:textAllCaps=
"false"
android:textColor=
"@color/darkText"
android:textSize=
"18sp"
android:textStyle=
"normal"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<ImageView
android:id=
"@+id/app_settings_edit"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"8dp"
android:contentDescription=
"@string/change_your_password"
android:src=
"@drawable/ms_ic_chevron_right"
android:text=
"@string/app_settings"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"@+id/app_settings_btn"
app:layout_constraintHorizontal_bias=
"0.954"
app:layout_constraintStart_toStartOf=
"@+id/app_settings_btn"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.5"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<View
android:id=
"@+id/sep8"
style=
"@style/Divider"
/>
<Button
android:id=
"@+id/button_sign_out"
style=
"@style/AppButtonBorders"
...
...
app/src/main/res/values-en/strings.xml
View file @
1de63587
...
...
@@ -245,4 +245,5 @@
<string
name=
"password_ok"
>
Password OK!
</string>
<string
name=
"passwords_match"
>
Passwords match.
</string>
<string
name=
"email_valid"
>
Email is valid
</string>
<string
name=
"more"
>
More
</string>
</resources>
app/src/main/res/values/strings.xml
View file @
1de63587
...
...
@@ -301,4 +301,6 @@
<string
name=
"password_ok"
>
Password OK!
</string>
<string
name=
"passwords_match"
>
Passwords match.
</string>
<string
name=
"email_valid"
>
Email is valid
</string>
<string
name=
"more"
>
More
</string>
<string
name=
"app_settings"
>
App Settings
</string>
</resources>
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