Skip to content

Commit 9e3cf33

Browse files
ATHBKATHBK
authored andcommitted
Update activity
1 parent 6e707f1 commit 9e3cf33

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
android:label="@string/app_name"
99
android:supportsRtl="true"
1010
android:theme="@style/AppTheme">
11-
<activity android:name=".MainActivity">
11+
<activity android:name=".IndicatorExampleActivity">
1212
<intent-filter>
1313
<action android:name="android.intent.action.MAIN" />
1414

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package com.athbk;
2+
3+
import android.support.v4.view.ViewPager;
4+
import android.support.v7.app.AppCompatActivity;
5+
import android.os.Bundle;
6+
7+
import com.athbk.indicatorview.IndicatorView;
8+
import com.athbk.indicatorview.model.Indicator;
9+
import com.athbk.indicatorview.model.StyleIndicator;
10+
11+
public class IndicatorExampleActivity extends AppCompatActivity {
12+
13+
private ViewPager viewPager;
14+
private IndicatorView indicator;
15+
16+
@Override
17+
protected void onCreate(Bundle savedInstanceState) {
18+
super.onCreate(savedInstanceState);
19+
setContentView(R.layout.activity_main);
20+
21+
viewPager = (ViewPager) findViewById(R.id.viewPager);
22+
indicator = (IndicatorView) findViewById(R.id.indicator);
23+
ViewPagerAdapter adapter = new ViewPagerAdapter(3);
24+
viewPager.setAdapter(adapter);
25+
indicator.setType(StyleIndicator.SHAPE);
26+
indicator.setHeightShape(16);
27+
indicator.setWidthShape(50);
28+
indicator.setViewPager(viewPager);
29+
30+
///
31+
}
32+
}
33+

0 commit comments

Comments
 (0)