@@ -99,7 +99,7 @@ public int getCount() {
99
99
}
100
100
101
101
@ Override
102
- public IPagerTitleView getItemView (Context context , final int index ) {
102
+ public IPagerTitleView getTitleView (Context context , final int index ) {
103
103
ClipPagerTitleView clipPagerTitleView = new ClipPagerTitleView (context );
104
104
clipPagerTitleView .setText (mDataList .get (index ));
105
105
clipPagerTitleView .setTextColor (Color .parseColor ("#f2c4c4" ));
@@ -131,7 +131,7 @@ public int getCount() {
131
131
}
132
132
133
133
@ Override
134
- public IPagerTitleView getItemView (Context context , final int index ) {
134
+ public IPagerTitleView getTitleView (Context context , final int index ) {
135
135
ColorTransitionPagerTitleView colorTransitionPagerTitleView = new ColorTransitionPagerTitleView (context );
136
136
colorTransitionPagerTitleView .setText (mDataList .get (index ));
137
137
colorTransitionPagerTitleView .setNormalColor (Color .GRAY );
@@ -174,7 +174,7 @@ public int getCount() {
174
174
}
175
175
176
176
@ Override
177
- public IPagerTitleView getItemView (Context context , final int index ) {
177
+ public IPagerTitleView getTitleView (Context context , final int index ) {
178
178
final ColorTransitionPagerTitleView colorTransitionPagerTitleView = new ColorTransitionPagerTitleView (context );
179
179
colorTransitionPagerTitleView .setText (mDataList .get (index ));
180
180
colorTransitionPagerTitleView .setNormalColor (Color .GRAY );
@@ -223,7 +223,7 @@ public int getCount() {
223
223
}
224
224
225
225
@ Override
226
- public IPagerTitleView getItemView (Context context , final int index ) {
226
+ public IPagerTitleView getTitleView (Context context , final int index ) {
227
227
final ColorTransitionPagerTitleView colorTransitionPagerTitleView = new ColorTransitionPagerTitleView (context );
228
228
colorTransitionPagerTitleView .setText (mDataList .get (index ));
229
229
colorTransitionPagerTitleView .setNormalColor (Color .GRAY );
@@ -261,6 +261,15 @@ public IPagerIndicator getIndicator(Context context) {
261
261
indicator .setColorList (colorList );
262
262
return indicator ;
263
263
}
264
+
265
+ @ Override
266
+ public float getTitleWeight (Context context , int index ) {
267
+ if (index == 2 ) {
268
+ return 1.5f ;
269
+ } else {
270
+ return 1 ;
271
+ }
272
+ }
264
273
});
265
274
magic_indicator3 .setNavigator (commonNavigator3 );
266
275
@@ -275,7 +284,7 @@ public int getCount() {
275
284
}
276
285
277
286
@ Override
278
- public IPagerTitleView getItemView (Context context , final int index ) {
287
+ public IPagerTitleView getTitleView (Context context , final int index ) {
279
288
ColorTransitionPagerTitleView colorTransitionPagerTitleView = new ColorTransitionPagerTitleView (context );
280
289
colorTransitionPagerTitleView .setText (mDataList .get (index ));
281
290
colorTransitionPagerTitleView .setNormalColor (Color .GRAY );
@@ -315,7 +324,7 @@ public int getCount() {
315
324
}
316
325
317
326
@ Override
318
- public IPagerTitleView getItemView (Context context , final int index ) {
327
+ public IPagerTitleView getTitleView (Context context , final int index ) {
319
328
ScaleTransitionPagerTitleView colorTransitionPagerTitleView = new ScaleTransitionPagerTitleView (context );
320
329
colorTransitionPagerTitleView .setText (mDataList .get (index ));
321
330
colorTransitionPagerTitleView .setTextSize (18 );
@@ -356,7 +365,7 @@ public int getCount() {
356
365
}
357
366
358
367
@ Override
359
- public IPagerTitleView getItemView (Context context , final int index ) {
368
+ public IPagerTitleView getTitleView (Context context , final int index ) {
360
369
return new DummyPagerTitleView (context );
361
370
}
362
371
@@ -383,7 +392,7 @@ public int getCount() {
383
392
}
384
393
385
394
@ Override
386
- public IPagerTitleView getItemView (Context context , final int index ) {
395
+ public IPagerTitleView getTitleView (Context context , final int index ) {
387
396
SimplePagerTitleView simplePagerTitleView = new SimplePagerTitleView (context );
388
397
simplePagerTitleView .setText (mDataList .get (index ));
389
398
simplePagerTitleView .setNormalColor (Color .GRAY );
@@ -429,7 +438,7 @@ public int getCount() {
429
438
}
430
439
431
440
@ Override
432
- public IPagerTitleView getItemView (Context context , final int index ) {
441
+ public IPagerTitleView getTitleView (Context context , final int index ) {
433
442
ScaleTransitionPagerTitleView colorTransitionPagerTitleView = new ScaleTransitionPagerTitleView (context );
434
443
colorTransitionPagerTitleView .setText (mDataList .get (index ));
435
444
colorTransitionPagerTitleView .setTextSize (18 );
@@ -470,7 +479,7 @@ public int getCount() {
470
479
}
471
480
472
481
@ Override
473
- public IPagerTitleView getItemView (Context context , final int index ) {
482
+ public IPagerTitleView getTitleView (Context context , final int index ) {
474
483
SimplePagerTitleView simplePagerTitleView = new SimplePagerTitleView (context );
475
484
simplePagerTitleView .setText (mDataList .get (index ));
476
485
simplePagerTitleView .setNormalColor (Color .parseColor ("#333333" ));
@@ -504,7 +513,7 @@ public int getCount() {
504
513
}
505
514
506
515
@ Override
507
- public IPagerTitleView getItemView (Context context , final int index ) {
516
+ public IPagerTitleView getTitleView (Context context , final int index ) {
508
517
SimplePagerTitleView simplePagerTitleView = new SimplePagerTitleView (context );
509
518
simplePagerTitleView .setText (mDataList .get (index ));
510
519
simplePagerTitleView .setNormalColor (Color .parseColor ("#333333" ));
@@ -551,7 +560,7 @@ public int getCount() {
551
560
}
552
561
553
562
@ Override
554
- public IPagerTitleView getItemView (Context context , final int index ) {
563
+ public IPagerTitleView getTitleView (Context context , final int index ) {
555
564
CommonPagerTitleView commonPagerTitleView = new CommonPagerTitleView (MainActivity .this );
556
565
commonPagerTitleView .setContentView (R .layout .simple_pager_title_layout );
557
566
0 commit comments