1
00:00:00,180 --> 00:00:04,920
So as you can see here these are the lines of code that I pasted here.

2
00:00:04,950 --> 00:00:07,860
So as you can see here I pasted our list preference.

3
00:00:07,860 --> 00:00:14,130
So this means that you're going to have a radio group that contains radio buttons right.

4
00:00:14,150 --> 00:00:18,710
So as you can see here first we need to actually put the entries attribute.

5
00:00:18,710 --> 00:00:20,380
So Android entries.

6
00:00:20,510 --> 00:00:26,120
And as you can see here I referred to this as sign Ari and this means that you are referring to this

7
00:00:26,180 --> 00:00:29,180
address that exemplified slash colors.

8
00:00:29,180 --> 00:00:33,600
So now there's actually capitis colors here and now.

9
00:00:33,710 --> 00:00:36,670
Let's actually go inside this area is that exemplified.

10
00:00:36,920 --> 00:00:40,400
And here let's create I think add a resource here.

11
00:00:40,410 --> 00:00:43,690
So just open a tag and just type in here streambed at 8.

12
00:00:43,970 --> 00:00:51,530
And for the name just a place that's value here colors and then I'll just close the stack and now inside

13
00:00:51,530 --> 00:00:55,910
this string and here I am going to pasting some lines of code here and then I'm going to explain to

14
00:00:55,910 --> 00:00:58,090
you what's going on here.

15
00:00:58,100 --> 00:01:02,420
So as you can see here these are the lines of code that I pasted here.

16
00:01:02,420 --> 00:01:06,590
So if you've got these items inside these colors starting at 8.

17
00:01:06,650 --> 00:01:10,110
So the first item is the color of white as you can see here.

18
00:01:10,130 --> 00:01:12,400
The second item is the color black.

19
00:01:12,430 --> 00:01:15,290
The first item is actually the color green.

20
00:01:15,350 --> 00:01:17,690
The fourth item is the color red.

21
00:01:17,750 --> 00:01:23,370
The fifth item is the color blue and the six color as you can see here is yellow.

22
00:01:23,510 --> 00:01:27,730
So these values are going to be the values that we are going to show to the user.

23
00:01:27,740 --> 00:01:32,690
So now if we actually show you the emulator here now as you can see here if I just click on this choose

24
00:01:32,690 --> 00:01:35,070
background color here as you can see here.

25
00:01:35,180 --> 00:01:37,980
These are the values that we are going to show to the user.

26
00:01:38,000 --> 00:01:38,450
Right.

27
00:01:38,630 --> 00:01:43,970
And if we actually select one of these values for example green and if I click on this back a patch

28
00:01:44,030 --> 00:01:49,340
button here as you can see now the background color of our Quiz application is clean.

29
00:01:49,400 --> 00:01:50,090
Right.

30
00:01:50,090 --> 00:01:51,890
So these are the values.

31
00:01:51,920 --> 00:01:55,510
As you can see here these are the values that we are going to show to the user.

32
00:01:55,550 --> 00:01:59,680
And here we created this thing Arrey in order to show these values to the user.

33
00:01:59,690 --> 00:02:00,320
Right.

34
00:02:00,320 --> 00:02:04,640
So let's go back to our Kulis underlined preferences that they.

35
00:02:04,850 --> 00:02:11,460
And here we have entry values and again are you referred to this phrase that exemplified at sign at

36
00:02:11,460 --> 00:02:17,050
a slash coloreds again are you referred to this string area here.

37
00:02:17,390 --> 00:02:23,300
So this means that we are going to actually interact also with these values that we are going to show

38
00:02:23,300 --> 00:02:24,290
to the user.

39
00:02:24,500 --> 00:02:28,330
The color of white black green red blue or yellow.

40
00:02:28,450 --> 00:02:32,500
We are going to interact with these values from our Java coats later.

41
00:02:32,780 --> 00:02:37,130
So that's what actually referred here to this color.

42
00:02:37,360 --> 00:02:41,910
String art twice once for these entries and once for these entry values.

43
00:02:41,930 --> 00:02:42,990
Right.

44
00:02:42,990 --> 00:02:46,250
So and as you can see here we have these key attributes.

45
00:02:46,280 --> 00:02:50,980
So the key attribute is actually the key that we're going that we need here.

46
00:02:50,990 --> 00:02:52,440
This works as an ID.

47
00:02:52,610 --> 00:02:59,030
So you need this key in order to actually interact with this list preferences later inside our Java

48
00:02:59,050 --> 00:02:59,700
coats.

49
00:02:59,720 --> 00:03:04,670
So the key is settings underline quis underline background underline color.

50
00:03:04,850 --> 00:03:07,220
So if you have a title as you can see here.

51
00:03:07,400 --> 00:03:12,110
So the title is as you can see here at the title that you're going to show to the user.

52
00:03:12,120 --> 00:03:14,640
So now let me show you the emulator here.

53
00:03:14,630 --> 00:03:18,550
As you can see the title is True's background color as you can see here.

54
00:03:18,710 --> 00:03:20,820
So as you can see at sidestream.

55
00:03:20,900 --> 00:03:26,770
So here we are referring to these strings that XML file slash choose background color.

56
00:03:26,770 --> 00:03:28,750
So let's actually copy this name here.

57
00:03:28,750 --> 00:03:30,060
Choose by the color.

58
00:03:30,230 --> 00:03:33,180
And then let's go inside this string that exemplified.

59
00:03:33,320 --> 00:03:36,680
And now let's actually create another string resource.

60
00:03:36,770 --> 00:03:39,060
So just open attack and just type in here strange.

61
00:03:39,290 --> 00:03:44,690
And for the name just paste that value here choose underlined by the underlined color.

62
00:03:44,840 --> 00:03:47,210
And now let's actually close this tag here.

63
00:03:47,360 --> 00:03:50,990
So now let's just type in here as you can see here.

64
00:03:51,390 --> 00:03:54,110
We need to just type in here is what you choose background color.

65
00:03:54,230 --> 00:04:03,280
So here I can just type in Choose background color as you can see here.

66
00:04:03,410 --> 00:04:10,280
So now let's actually go back inside our cubes underlined preferences that they said file.

67
00:04:10,520 --> 00:04:16,190
Now as you can see here the error is gone and we have also these Summerlee attributes which again refers

68
00:04:16,190 --> 00:04:23,060
to this stream that exemplifies So same strange slash choose color description so that the description

69
00:04:23,060 --> 00:04:28,170
is disvalue choose up on one of these colors as the background color.

70
00:04:28,170 --> 00:04:30,360
So as you can see here we have a typo here.

71
00:04:30,440 --> 00:04:34,070
I didn't actually typed this but you're right.

72
00:04:34,070 --> 00:04:37,560
So let's actually write it here correctly.

73
00:04:37,670 --> 00:04:39,080
So just copy this value here.

74
00:04:39,080 --> 00:04:44,720
Choose color description and now this to go inside the string that exemplified.

75
00:04:45,140 --> 00:04:47,960
And now let's create a strange resource.

76
00:04:47,960 --> 00:04:48,790
So it's three.

77
00:04:48,980 --> 00:04:53,390
And the name is going to be this value that we copy it choose color description.

78
00:04:53,400 --> 00:05:00,000
And now let's actually close this this attack here and now as you can see here for the description I

79
00:05:00,000 --> 00:05:03,780
had just type in Choose one of these colors as the background color.

80
00:05:03,890 --> 00:05:08,600
So here I can just taping choose one of these

81
00:05:11,340 --> 00:05:19,450
colors as back get them color.

82
00:05:20,430 --> 00:05:21,140
Right.

83
00:05:21,150 --> 00:05:23,730
So as you can see here this is going to be the description.

84
00:05:24,270 --> 00:05:27,360
And now as you can see this is the description right.

85
00:05:27,360 --> 00:05:31,730
So now let's actually go back inside our quiz underlined preferences that exemplified.

86
00:05:31,770 --> 00:05:34,540
And now as you can see here again the error is gone.

87
00:05:34,710 --> 00:05:37,740
And again for the assistant to be assigned a value.

88
00:05:37,730 --> 00:05:38,180
True.

89
00:05:38,310 --> 00:05:44,300
So this persistent attribute is going to persist at these settings or to their shared preferences.

90
00:05:44,310 --> 00:05:51,360
As you can see here and then later when you want to actually run for an application for the next time

91
00:05:52,710 --> 00:05:57,870
you can actually read those settings for the shared for instance file that we have inside our Android

92
00:05:57,870 --> 00:05:58,620
device.

93
00:05:58,620 --> 00:06:05,250
So this is very important that you assign the value true for this attribute and we have also the default

94
00:06:05,250 --> 00:06:09,880
value so for the for example for the first time that our application is going to be run on the user's

95
00:06:09,900 --> 00:06:15,920
device if you're going to use this a default value as you can see here again you referred to these strings

96
00:06:15,930 --> 00:06:16,730
that exemplified.

97
00:06:16,810 --> 00:06:21,580
And I just typed in at sign streambed slash default color black.

98
00:06:21,600 --> 00:06:24,430
So we use the color black as the default value right.

99
00:06:24,450 --> 00:06:30,810
So let's actually copy this value here and now let's actually go inside this string that XML file here.

100
00:06:31,770 --> 00:06:34,760
And now let's actually create another string resource.

101
00:06:34,760 --> 00:06:39,450
So just open a tag and just type in a string and for the name just paste that value here.

102
00:06:39,450 --> 00:06:43,100
Default color black and let's close this page here.

103
00:06:43,110 --> 00:06:47,690
And for the value I can just type in here black as you can see here.

104
00:06:47,700 --> 00:06:49,840
So this is going to be the default value right.

105
00:06:49,850 --> 00:06:55,260
I remember that this is really important that you put this name here with capital B as you can see here

106
00:06:55,770 --> 00:06:58,950
inside these arrows that exemplified.

107
00:06:59,130 --> 00:07:05,460
We have these values as you can see white with capital W blacks with capital B green with capital G

108
00:07:05,790 --> 00:07:12,520
red capital R and blue the capital B and yellow with capital Y and this means that B.

109
00:07:12,780 --> 00:07:15,590
Because these values are written in.

110
00:07:15,840 --> 00:07:20,670
As you can see here in this way when we want to actually provide a default value that default value

111
00:07:20,850 --> 00:07:24,030
also must be actually treated as.

112
00:07:24,090 --> 00:07:27,860
That way that we put this value inside arrays that are exempt.

113
00:07:28,020 --> 00:07:34,140
As you can see here because inside is Ariz that him and here for example we put the value big Blache

114
00:07:34,170 --> 00:07:39,860
with capital B then we want to provide a default value for our list preferences.

115
00:07:39,870 --> 00:07:44,960
We need to actually put that value the same here with capital B as you can see here.

116
00:07:44,970 --> 00:07:46,280
So this is really important.

117
00:07:46,290 --> 00:07:50,620
So let's actually go inside Ahlquist that underline preferences that exemplified.

118
00:07:50,940 --> 00:07:53,100
And now as you can see here the error is gone.

119
00:07:53,100 --> 00:07:53,720
Right.

120
00:07:54,000 --> 00:07:58,950
So now I want to actually paste in some more lines of code here and then I'm going to explain to you

121
00:07:59,160 --> 00:08:00,760
what's going on here.

