parent
572a0466c4
commit
cb5c0acc49
@ -1,27 +1,30 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.app.library.common.view"
|
package="com.app.library.common.view"
|
||||||
android:versionCode="1"
|
android:versionCode="1"
|
||||||
android:versionName="1.0" >
|
android:versionName="1.0" >
|
||||||
|
|
||||||
<uses-sdk
|
<uses-sdk
|
||||||
android:minSdkVersion="8"
|
android:minSdkVersion="8"
|
||||||
android:targetSdkVersion="17" />
|
android:targetSdkVersion="17" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@drawable/ic_launcher"
|
android:icon="@drawable/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:theme="@style/AppTheme" >
|
android:theme="@style/AppTheme" >
|
||||||
<activity
|
<activity
|
||||||
android:name="com.app.library.common.view.sample.SampleActivity"
|
android:name="com.app.library.common.view.sample.SampleActivity"
|
||||||
android:label="@string/app_name" >
|
android:label="@string/app_name" >
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
</application>
|
<activity android:name=".sample.AutoImageIndicatorActivity" />
|
||||||
|
<activity android:name=".sample.GuideImageIndicatorActivity" />
|
||||||
|
<activity android:name=".sample.ImageIndicatorActivity" />
|
||||||
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" >
|
||||||
|
|
||||||
|
<com.app.library.common.view.AutoImageIndicatorView
|
||||||
|
android:id="@+id/guide_indicate_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
package com.app.library.common.view.sample;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import com.app.library.common.view.AutoImageIndicatorView;
|
||||||
|
import com.app.library.common.view.ImageIndicatorView;
|
||||||
|
import com.app.library.common.view.R;
|
||||||
|
|
||||||
|
public class AutoImageIndicatorActivity extends Activity {
|
||||||
|
private AutoImageIndicatorView autoImageIndicatorView;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_indicator_auto);
|
||||||
|
|
||||||
|
autoImageIndicatorView = (AutoImageIndicatorView) findViewById(R.id.auto_indicate_view);
|
||||||
|
autoImageIndicatorView.setOnItemChangeListener(new ImageIndicatorView.OnItemChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onPosition(int position, int totalCount) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
autoImageIndicatorView.setOnItemChangeListener(new ImageIndicatorView.OnItemChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onPosition(int position, int totalCount) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
initView();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initView() {
|
||||||
|
final Integer[] resArray = new Integer[] { R.drawable.ic_launcher, R.drawable.ic_launcher };
|
||||||
|
autoImageIndicatorView.setBroadcastEnable(true);
|
||||||
|
autoImageIndicatorView.setBroadCastTimes(5);//循环播放5次
|
||||||
|
autoImageIndicatorView.setBroadcastTimeIntevel(2 * 1000, 3 * 1000);//播放启动时间及间隔
|
||||||
|
autoImageIndicatorView.setupLayoutByDrawable(resArray);//图片
|
||||||
|
autoImageIndicatorView.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,44 +0,0 @@
|
|||||||
package com.app.library.common.view.sample;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.os.Bundle;
|
|
||||||
|
|
||||||
import com.app.library.common.view.AutoImageIndicatorView;
|
|
||||||
import com.app.library.common.view.ImageIndicatorView;
|
|
||||||
import com.app.library.common.view.R;
|
|
||||||
|
|
||||||
public class AutoScrollIndicateActivity extends Activity {
|
|
||||||
private AutoImageIndicatorView scrollIndicateView;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_indicator_auto);
|
|
||||||
|
|
||||||
scrollIndicateView = (AutoImageIndicatorView) findViewById(R.id.auto_scroll_indicate_view);
|
|
||||||
scrollIndicateView.setOnItemChangeListener(new ImageIndicatorView.OnItemChangeListener() {
|
|
||||||
@Override
|
|
||||||
public void onPosition(int position, int totalCount) {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
scrollIndicateView.setOnItemChangeListener(new ImageIndicatorView.OnItemChangeListener() {
|
|
||||||
@Override
|
|
||||||
public void onPosition(int position, int totalCount) {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
initView();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initView() {
|
|
||||||
final Integer[] resArray = new Integer[] { R.drawable.ic_launcher, R.drawable.ic_launcher };
|
|
||||||
scrollIndicateView.setBroadcastEnable(true);
|
|
||||||
scrollIndicateView.setBroadCastTimes(5);//循环播放5次
|
|
||||||
scrollIndicateView.setBroadcastTimeIntevel(2 * 1000, 3 * 1000);//播放启动时间及间隔
|
|
||||||
scrollIndicateView.setupLayoutByDrawable(resArray);//图片
|
|
||||||
scrollIndicateView.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
package com.app.library.common.view.sample;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import com.app.library.common.view.ImageIndicatorView;
|
||||||
|
import com.app.library.common.view.R;
|
||||||
|
|
||||||
|
public class GuideImageIndicatorActivity extends Activity {
|
||||||
|
private ImageIndicatorView imageIndicatorView;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_indicator_guide);
|
||||||
|
|
||||||
|
this.imageIndicatorView = (ImageIndicatorView) findViewById(R.id.guide_indicate_view);
|
||||||
|
this.imageIndicatorView.setOnItemChangeListener(new ImageIndicatorView.OnItemChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onPosition(int position, int totalCount) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.imageIndicatorView.setOnItemChangeListener(new ImageIndicatorView.OnItemChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onPosition(int position, int totalCount) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.initView();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initView() {
|
||||||
|
final Integer[] resArray = new Integer[] { R.drawable.ic_launcher, R.drawable.ic_launcher };
|
||||||
|
this.imageIndicatorView.setupLayoutByDrawable(resArray);
|
||||||
|
this.imageIndicatorView.setIndicateStyle(ImageIndicatorView.INDICATE_USERGUIDE_STYLE);
|
||||||
|
this.imageIndicatorView.show();
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in new issue