Commit 75e4793b authored by Ivana Zuzic's avatar Ivana Zuzic Committed by Commit Bot

[PWD Editing Android] Add save action to the password editing fragment

Save action is a prerequisite for the future commit that will save the
changes made on the password.

Bug: 377410
Change-Id: I6482ad013a9fb1acc909a461ceb623f7d809cb3a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1710315Reviewed-by: default avatarFriedrich [CET] <fhorschig@chromium.org>
Reviewed-by: default avatarTheresa <twellington@chromium.org>
Commit-Queue: Ivana Zuzic <izuzic@google.com>
Cr-Commit-Position: refs/heads/master@{#681764}
parent 2ef78c70
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2019 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" >
<item
android:id="@+id/action_save_edited_password"
android:title="@string/save"
app:showAsAction="always"/>
</menu>
\ No newline at end of file
......@@ -7,6 +7,8 @@ package org.chromium.chrome.browser.preferences.password;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
......@@ -25,6 +27,7 @@ public class PasswordEntryEditor extends Fragment {
@Override
public View onCreateView(
LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
setHasOptionsMenu(true);
getActivity().setTitle(R.string.password_entry_viewer_edit_stored_password_action_title);
return inflater.inflate(R.layout.password_entry_editor, container, false);
}
......@@ -44,4 +47,9 @@ public class PasswordEntryEditor extends Fragment {
mUsernameText.setText(mSavedPasswordEntry.getUserName());
mPasswordText.setText(mSavedPasswordEntry.getPassword());
}
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
inflater.inflate(R.menu.password_entry_editor_action_bar_menu, menu);
}
}
\ 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