Revision 0be78976
Added by Leszek Koltunski over 6 years ago
src/main/java/org/distorted/examples/effects3d/Effects3DTab.java | ||
---|---|---|
54 | 54 |
{ |
55 | 55 |
mList = new ArrayList<>(); |
56 | 56 |
mEffectAdd = 0; |
57 |
|
|
58 |
android.util.Log.e("tab", "TAB CONSTRUCTOR"); |
|
59 | 57 |
} |
60 | 58 |
|
61 | 59 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
99 | 97 |
mEffectStrings[i] = mEffectNames[i].name(); |
100 | 98 |
} |
101 | 99 |
|
102 |
android.util.Log.e("tab", "onCreateView, this is fragment position "+position+" type="+mType.name()); |
|
103 |
|
|
104 | 100 |
View rootView = inflater.inflate( mTab, container, false); |
105 | 101 |
return rootView; |
106 | 102 |
} |
... | ... | |
112 | 108 |
{ |
113 | 109 |
super.onStart(); |
114 | 110 |
|
115 |
android.util.Log.e("tab", "onStart, type="+mType.name()); |
|
116 |
} |
|
117 |
|
|
118 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
119 |
|
|
120 |
@Override |
|
121 |
public void onResume() |
|
122 |
{ |
|
123 |
super.onResume(); |
|
124 |
|
|
125 |
android.util.Log.e("tab", "onResume, type="+mType.name()); |
|
126 |
|
|
127 | 111 |
Effects3DActivity2 act = (Effects3DActivity2)getActivity(); |
128 | 112 |
|
129 | 113 |
ArrayAdapter<String> adapterEffect = new ArrayAdapter<>( act, android.R.layout.simple_spinner_item, mEffectStrings); |
... | ... | |
131 | 115 |
|
132 | 116 |
Spinner effectSpinner = act.findViewById(mSpinner); |
133 | 117 |
|
134 |
if( mSpinner == R.id.effects3dspinner1 ) android.util.Log.e("tab", "onStart, mSpinner correct"); |
|
135 |
if( effectSpinner==null ) android.util.Log.e("tab", "onStart, effectSpinner null"); |
|
136 |
|
|
137 | 118 |
effectSpinner.setOnItemSelectedListener(this); |
138 | 119 |
effectSpinner.setAdapter(adapterEffect); |
139 | 120 |
|
src/main/java/org/distorted/examples/effects3d/Effects3DTabViewPager.java | ||
---|---|---|
40 | 40 |
{ |
41 | 41 |
super(fm); |
42 | 42 |
mAct = new WeakReference<>(act); |
43 |
|
|
44 |
android.util.Log.e("viewPager"," CONSTRUCTOR "); |
|
45 | 43 |
} |
46 | 44 |
|
47 | 45 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
49 | 47 |
@Override |
50 | 48 |
public Fragment getItem(int position) |
51 | 49 |
{ |
52 |
android.util.Log.e("viewPager","creating tab "+position); |
|
53 |
|
|
54 | 50 |
if( position>=0 && position<Effects3DActivity2.NUM_TABS ) |
55 | 51 |
{ |
56 | 52 |
Bundle bundle = new Bundle(); |
Also available in: Unified diff
Effects3D app: remove debugs.