2121
2222public class FragmentTreeView extends LinearLayout {
2323
24- HashMap <String , STree > mAFMap ;//activity-fragmentList
25- HashMap <String , Integer > mFLMap ;//fragment-life
24+ HashMap <String , STree > mAFMap ; //activity-fragmentList
25+ HashMap <String , Integer > mFLMap ; //fragment-life
2626 STree mTree ;
2727
2828 LifecycleObservable mLifecycleObservable ;
@@ -43,10 +43,6 @@ private void notifyData(){
4343 removeAllViews ();
4444 mLifecycleObservable .deleteObservers ();
4545 if (mTree != null ){
46- mTree .setTabs (
47- getResources ().getString (R .string .tab1 ),
48- getResources ().getString (R .string .tab2 ),
49- getResources ().getString (R .string .tab3 ));
5046 List <String > strings = mTree .convertToList ();
5147 for (String s : strings ){
5248 addTextView (s );
@@ -57,7 +53,7 @@ private void notifyData(){
5753 private void addTextView (String text ){
5854 ObserverTextView textView = new ObserverTextView (getContext ());
5955 textView .setTextSize (ActivityTask .getTextSize ());
60- String [] arr = text .split (getResources (). getString ( R . string . tab0 ));
56+ String [] arr = text .split (String . valueOf ( '\u2500' )); // -
6157 String name = arr [arr .length - 1 ];
6258 int life = mFLMap .containsKey (name ) ? mFLMap .get (name ) : 0 ;
6359 textView .setTag (name );
@@ -72,10 +68,6 @@ public void onActivityResume(String activityName){
7268 mTree = mAFMap .get (activityName );
7369 if (mTree == null ){
7470 mTree = new STree ();
75- mTree .setTabs (
76- getResources ().getString (R .string .tab1 ),
77- getResources ().getString (R .string .tab2 ),
78- getResources ().getString (R .string .tab3 ));
7971 mAFMap .put (activityName , mTree );
8072 }
8173 notifyData ();
@@ -94,10 +86,6 @@ public void onFragmentChange(FragmentInfo fragmentInfo){
9486 STree stree = mAFMap .get (parent );
9587 if (stree == null ){
9688 stree = new STree ();
97- mTree .setTabs (
98- getResources ().getString (R .string .tab1 ),
99- getResources ().getString (R .string .tab2 ),
100- getResources ().getString (R .string .tab3 ));
10189 mAFMap .put (parent , stree );
10290 }
10391
0 commit comments