Settag is a Android of the View a useful method in a class,
In the same class, it is convenient to access data without building a database,
It also saves memory more than sharepreference.
Settag ( Object tag) method is relatively simple
Like what
TextView tvexecutor = (TextView) Findviewbyid (R.ID.T);
Tvexecutor.settag(selectedusermap);
This Selectedusermap
Can make map<string, string> selectedusermap this object.
It can also be the object of Linkedlist<carentity> mlist.
You can store a variety of temporary data, but you can't call it a storage method.
In the same class, we can use Settag (), Gettag (), to access the data.
Can one object, set multiple tags? The answer is yes.
Add in Res/values/strings.xml
<span face= "Consolas, Menlo, Monaco, ' Lucida Console ', ' Liberation Mono ', ' Dejavu Sans mono ', ' Bitstream Vera Sans Mon O ', ' Courier New ', monospace, serif "style=" Font-family:consolas, Menlo, Monaco, ' Lucida Console ', ' Liberation Mono ', ' De Javu Sans Mono ', ' bitstream Vera Sans mono ', ' Courier New ', monospace, serif; " ><span style= "LINE-HEIGHT:18PX;" ><span style= "color: #cc0000;" ><resources></span></span></span>
<span style= "color: #cc0000;" ><span face= "Consolas, Menlo, Monaco, ' Lucida Console ', ' Liberation Mono ', ' Dejavu Sans mono ', ' Bitstream Vera Sans Mono ', ' Courier New ', monospace, serif "style=" Font-family:consolas, Menlo, Monaco, ' Lucida Console ', ' Liberation Mono ', ' Dejavu Sans mono ', ' bitstream Vera Sans mono ', ' Courier New ', monospace, serif; " ><item type= "id" name= "tag_a</span><span style=" Font-family:consolas, Menlo, Monaco, ' Lucida Console ', ' Liberation Mono ', ' Dejavu Sans mono ', ' bitstream Vera Sans mono ', ' Courier New ', monospace, serif; BACKGROUND-COLOR:RGB (240, 240, 240); " > "></ITEM></SPAN></SPAN>
<span face= "Consolas, Menlo, Monaco, ' Lucida Console ', ' Liberation Mono ', ' Dejavu Sans mono ', ' Bitstream Vera Sans Mon O ', ' Courier New ', monospace, serif "style=" Font-family:consolas, Menlo, Monaco, ' Lucida Console ', ' Liberation Mono ', ' De Javu Sans Mono ', ' bitstream Vera Sans mono ', ' Courier New ', monospace, serif; " ><span style= "color: #cc0000;" ><item type= "id" name= "tag_b" ></ITEM></SPAN></SPAN>
<span face= "Consolas, Menlo, Monaco, ' Lucida Console ', ' Liberation Mono ', ' Dejavu Sans mono ', ' Bitstream Vera Sans Mon O ', ' Courier New ', monospace, serif "style=" Font-family:consolas, Menlo, Monaco, ' Lucida Console ', ' Liberation Mono ', ' De Javu Sans Mono ', ' bitstream Vera Sans mono ', ' Courier New ', monospace, serif; " ><span style= "color: #cc0000;" ></resources></span></span>
<span face= "Consolas, Menlo, Monaco, ' Lucida Console ', ' Liberation Mono ', ' Dejavu Sans mono ', ' bitstream Vera Sans Mono ' ', ' Courier New ', monospace, serif ' style= ' Font-family:consolas, Menlo, Monaco, ' Lucida Console ', ' Liberation Mono ', ' Dej Avu Sans Mono ', ' bitstream Vera Sans mono ', ' Courier New ', monospace, serif; " ></span>
In the activity, the use of the time to write
<span face= "Consolas, Menlo, Monaco, ' Lucida Console ', ' Liberation Mono ', ' Dejavu Sans mono ', ' Bitstream Vera Sans Mon O ', ' Courier New ', monospace, serif "style=" Font-family:consolas, Menlo, Monaco, ' Lucida Console ', ' Liberation Mono ', ' De Javu Sans Mono ', ' bitstream Vera Sans mono ', ' Courier New ', monospace, serif; " ></span>
<code style= "border:0px; Vertical-align:baseline; Background-color:rgb (238, 238, 238); Font-family:consolas, Menlo, Monaco, ' Lucida Console ', ' Liberation Mono ', ' Dejavu Sans mono ', ' bitstream Vera Sans Mono ', ' Courier New ', monospace, serif; padding:0px; margin:0px; " ><span style= "color: #cc0000;" ><span class= "PLN" style= "border:0px; Vertical-align:baseline; Background-color:transparent; padding:0px; margin:0px; " ><span style= "font-family:arial; font-size:14px; line-height:26px; " >tvexecutor</span></span><span class= "pun" style= "border:0px; Vertical-align:baseline; Background-color:transparent; padding:0px; margin:0px; " >.</span><span class= "PLN" style= "border:0px; Vertical-align:baseline; Background-color:transparent; padding:0px; margin:0px; " >settag</span><span class= "pun" style= "border:0px; Vertical-align:baseline; Background-color:transparent; padding:0px; margin:0px; " > (</span><span Class= "PLN" style= "border:0px; Vertical-align:baseline; Background-color:transparent; padding:0px; margin:0px; " >r</span><span class= "pun" style= "border:0px; Vertical-align:baseline; Background-color:transparent; padding:0px; margin:0px; " >.</span><span class= "pun" style= "border:0px; Vertical-align:baseline; Background-color:transparent; padding:0px; margin:0px; " ><span color= "#00008b" >id.tag_a</span></span><span class= "pun" style= "border:0px"; Vertical-align:baseline; Background-color:transparent; padding:0px; margin:0px; " >,</span><span class= "PLN" style= "border:0px; Vertical-align:baseline; Background-color:transparent; padding:0px; margin:0px; " > </span><span class= "str" style= "border:0px; Vertical-align:baseline; Background-color:transparent; padding:0px; margin:0px; " > "Tease" </span><span class= "pun" style= "border:0px; Vertical-align:baseline; Background-color:transparent; Padding:0px; margin:0px; " >); </span><span class= "PLN" style= "border:0px; Vertical-align:baseline; Background-color:transparent; padding:0px; margin:0px; " ><span style= "font-family:arial; font-size:14px; line-height:26px; " >tvexecutor</span></span><span class= "pun" style= "border:0px; Vertical-align:baseline; Background-color:transparent; padding:0px; margin:0px; " >.</span><span class= "PLN" style= "border:0px; Vertical-align:baseline; Background-color:transparent; padding:0px; margin:0px; " >settag</span><span class= "pun" style= "border:0px; Vertical-align:baseline; Background-color:transparent; padding:0px; margin:0px; " > (</span><span class= "PLN" style= "border:0px; vertical-align:baseline; background-color:transparent; padding:0px; margin:0px; " >r</span><span class= "pun" style= "border:0px; Vertical-align:baseline; Background-color:transparent; padding:0px; margin:0px; " >.</span><span class= "pun" style= "border:0px; Vertical-align:baseline; Background-color:transparent; padding:0px; margin:0px; " ><span color= "#00008b" >id.tag_b</span></span><span class= "pun" style= "border:0px"; Vertical-align:baseline; Background-color:transparent; padding:0px; margin:0px; " >,</span><span class= "PLN" style= "border:0px; Vertical-align:baseline; Background-color:transparent; padding:0px; margin:0px; " > </span><span class= "str" style= "border:0px; Vertical-align:baseline; Background-color:transparent; padding:0px; margin:0px; " > "2 goods" </span><span class= "pun" style= "border:0px; Vertical-align:baseline; Background-color:transparent; padding:0px; margin:0px; " >);</span></span></code>
Android Settag () with Gettag (), with set multiple Settag ()