Question: Hello, I need help with this coding as I don't understand what to do. It is from Murach's Android programming 2nd edition. It is Chapter

Hello, I need help with this coding as I don't understand what to do. It is from Murach's Android programming 2nd edition. It is Chapter 8 exc 4. I am very confused as this was not actually discussed in the chapter so I am usure how to do it.

here are the instructions

In this exercise, youll modify the Tip Calculator app presented in this chapter so it uses an EditTextPreference element

1. Start Android Studio and open the project named ch08_ex4_TipCalculator.

2. Open the preferences.xml file in the xml directory. Add an EditTextPreference element for a setting named Name. This setting should allow the user to enter his or her full name. 3. Run the app and use the Settings activity to enter your name.

4. Open the layout of the activity. Modify the layout, so it includes a fifth row that can display a name. Open the class for the Tip Calculator activity. Modify this code so it gets the name from the preferences and displays that name in t

This is the current coding for preferences.xml

xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <CheckBoxPreference  android:key="pref_remember_percent"  android:title="@string/remember_percent_title"  android:summary="@string/remember_percent_summary"  android:defaultValue="true" /> <ListPreference  android:key="pref_rounding"  android:title="@string/rounding_title"  android:summary="@string/rounding_summary"  android:dialogTitle="@string/rounding_title"  android:entries="@array/rounding_keys"  android:entryValues="@array/rounding_values"  android:defaultValue="@string/rounding_default" /> PreferenceScreen> 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!