Commit b9d8451d authored by samer's avatar samer

Added Password Update Feature

parent 4c5fe904
......@@ -51,6 +51,10 @@
android:name=".chatroom.ui.PinnedMessagesActivity"
android:theme="@style/AppTheme" />
<activity
android:name=".settings.password.ui.PasswordActivity"
android:theme="@style/AppTheme" />
<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
......
......@@ -15,6 +15,8 @@ import chat.rocket.android.chatrooms.di.ChatRoomsModule
import chat.rocket.android.dagger.scope.PerActivity
import chat.rocket.android.main.ui.MainActivity
import chat.rocket.android.profile.di.ProfileFragmentProvider
import chat.rocket.android.settings.password.di.PasswordFragmentProvider
import chat.rocket.android.settings.password.ui.PasswordActivity
import dagger.Module
import dagger.android.ContributesAndroidInjector
......@@ -41,4 +43,8 @@ abstract class ActivityBuilder {
@PerActivity
@ContributesAndroidInjector(modules = [PinnedMessagesFragmentProvider::class])
abstract fun bindPinnedMessagesActivity(): PinnedMessagesActivity
@PerActivity
@ContributesAndroidInjector(modules = [PasswordFragmentProvider::class])
abstract fun bindPasswordActivity(): PasswordActivity
}
\ No newline at end of file
......@@ -8,6 +8,7 @@ import android.view.MenuItem
import chat.rocket.android.R
import chat.rocket.android.chatrooms.ui.ChatRoomsFragment
import chat.rocket.android.profile.ui.ProfileFragment
import chat.rocket.android.settings.ui.SettingsFragment
import chat.rocket.android.util.extensions.addFragment
import dagger.android.AndroidInjection
import dagger.android.AndroidInjector
......@@ -70,6 +71,11 @@ class MainActivity : AppCompatActivity(), HasSupportFragmentInjector {
ProfileFragment.newInstance()
}
}
R.id.action_settings -> {
addFragment("SettingsFragment", R.id.fragment_container) {
SettingsFragment.newInstance()
}
}
}
}
......
......@@ -11,6 +11,11 @@
android:id="@+id/action_profile"
android:icon="@drawable/ic_person_black_24dp"
android:title="@string/title_profile" />
<item
android:id="@+id/action_settings"
android:icon="@drawable/ic_settings_black_24dp"
android:title="@string/title_settings"/>
</group>
</menu>
\ No newline at end of file
......@@ -8,6 +8,8 @@
<string name="title_legal_terms">Legal Terms</string>
<string name="title_chats">Chats</string>
<string name="title_profile">Profile</string>
<string name="title_settings">Settings</string>
<string name="title_password">Change Password</string>
<string name="title_update_profile">Update profile</string>
<!-- Actions -->
......@@ -18,6 +20,12 @@
<string name="action_update">Update</string>
<string name="action_logout">Log Out</string>
<string name="action_files">Files</string>
<string name="action_confirm_password">Confirm Password Change</string>
<!-- Settings List -->
<string-array name="settings_actions">
<item name="item_password">Change Password</item>
</string-array>
<!-- Regular information messages -->
<string name="msg_no_internet_connection">No internet connection</string>
......@@ -51,6 +59,8 @@
<string name="msg_content_description_show_attachment_options">Show attachment options</string>
<string name="msg_you">You</string>
<string name="msg_unknown">Unknown</string>
<string name="msg_new_password">Enter New Password</string>
<string name="msg_confirm_password">Confirm New Password</string>
<!-- System messages -->
<string name="message_room_name_changed">Room name changed to: %1$s by %2$s</string>
......
......@@ -43,6 +43,14 @@
<item name="android:background">@drawable/style_edit_text_profile</item>
</style>
<style name="EditText.Password" parent="TextAppearance.AppCompat">
<!-- Hint color and label color in FALSE state -->
<item name="android:textColorHint">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorPrimaryDark</item>
<item name="colorControlNormal">@color/colorPrimaryDark</item>
<item name="colorControlActivated">@color/colorPrimaryDark</item>
</style>
<style name="AuthenticationLabel" parent="TextAppearance.AppCompat.Medium">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">50dp</item>
......@@ -60,4 +68,9 @@
<item name="android:background">@drawable/effect_ripple</item>
</style>
<style name="ActionModeStyle" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
<item name="android:actionModeCloseDrawable">@drawable/ic_close_white_24dp</item>
<item name="actionModeCloseDrawable">@drawable/ic_close_white_24dp</item>
</style>
</resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment