master
Administrator 13 years ago
parent b45154c26b
commit 8cb44ed034

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

@ -7,6 +7,6 @@
<com.app.library.common.view.ImageIndicatorView <com.app.library.common.view.ImageIndicatorView
android:id="@+id/indicate_view" android:id="@+id/indicate_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="160dp" /> android:layout_height="120dp" />
</RelativeLayout> </RelativeLayout>

@ -6,6 +6,6 @@
<com.app.library.common.view.AutoImageIndicatorView <com.app.library.common.view.AutoImageIndicatorView
android:id="@+id/auto_indicate_view" android:id="@+id/auto_indicate_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="160dp" /> android:layout_height="120dp" />
</RelativeLayout> </RelativeLayout>

@ -6,6 +6,17 @@
<com.app.library.common.view.ImageIndicatorView <com.app.library.common.view.ImageIndicatorView
android:id="@+id/guide_indicate_view" android:id="@+id/guide_indicate_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" >
</com.app.library.common.view.ImageIndicatorView>
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginRight="20dp"
android:layout_marginBottom="45dp"
android:text="Go ahead!" />
</RelativeLayout> </RelativeLayout>

@ -27,11 +27,11 @@ public class AutoImageIndicatorView extends ImageIndicatorView {
/** /**
* *
*/ */
private static final long DEFAULT_STARTMILS = 3 * 1000; private static final long DEFAULT_STARTMILS = 2 * 1000;
/** /**
* *
*/ */
private static final long DEFAULT_INTEVALMILS = 5 * 1000; private static final long DEFAULT_INTEVALMILS = 3 * 1000;
/** /**
* ms * ms
*/ */

@ -33,7 +33,7 @@ public class AutoImageIndicatorActivity extends Activity {
} }
private void initView() { private void initView() {
final Integer[] resArray = new Integer[] { R.drawable.ic_launcher, R.drawable.ic_launcher }; final Integer[] resArray = new Integer[] { R.drawable.poster1, R.drawable.poster2, R.drawable.poster3 };
this.autoImageIndicatorView.setBroadcastEnable(true); this.autoImageIndicatorView.setBroadcastEnable(true);
this.autoImageIndicatorView.setBroadCastTimes(5);//循环播放5次 this.autoImageIndicatorView.setBroadCastTimes(5);//循环播放5次
this.autoImageIndicatorView.setBroadcastTimeIntevel(2 * 1000, 3 * 1000);//播放启动时间及间隔 this.autoImageIndicatorView.setBroadcastTimeIntevel(2 * 1000, 3 * 1000);//播放启动时间及间隔

@ -2,12 +2,15 @@ package com.app.library.common.view.sample;
import android.app.Activity; import android.app.Activity;
import android.os.Bundle; import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import com.app.library.common.view.ImageIndicatorView; import com.app.library.common.view.ImageIndicatorView;
import com.app.library.common.view.R; import com.app.library.common.view.R;
public class GuideImageIndicatorActivity extends Activity { public class GuideImageIndicatorActivity extends Activity {
private ImageIndicatorView imageIndicatorView; private ImageIndicatorView imageIndicatorView;
private Button goButton;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
@ -15,16 +18,17 @@ public class GuideImageIndicatorActivity extends Activity {
setContentView(R.layout.activity_indicator_guide); setContentView(R.layout.activity_indicator_guide);
this.imageIndicatorView = (ImageIndicatorView) findViewById(R.id.guide_indicate_view); this.imageIndicatorView = (ImageIndicatorView) findViewById(R.id.guide_indicate_view);
this.imageIndicatorView.setOnItemChangeListener(new ImageIndicatorView.OnItemChangeListener() { this.goButton = (Button) findViewById(R.id.button1);
@Override this.goButton.setVisibility(View.GONE);
public void onPosition(int position, int totalCount) {
}
});
this.imageIndicatorView.setOnItemChangeListener(new ImageIndicatorView.OnItemChangeListener() { this.imageIndicatorView.setOnItemChangeListener(new ImageIndicatorView.OnItemChangeListener() {
@Override @Override
public void onPosition(int position, int totalCount) { public void onPosition(int position, int totalCount) {
if (position == totalCount - 1) {
goButton.setVisibility(View.VISIBLE);
} else {
goButton.setVisibility(View.GONE);
}
} }
}); });
@ -32,7 +36,7 @@ public class GuideImageIndicatorActivity extends Activity {
} }
private void initView() { private void initView() {
final Integer[] resArray = new Integer[] { R.drawable.ic_launcher, R.drawable.ic_launcher }; final Integer[] resArray = new Integer[] { R.drawable.guide_01, R.drawable.guide_02, R.drawable.guide_03 };
this.imageIndicatorView.setupLayoutByDrawable(resArray); this.imageIndicatorView.setupLayoutByDrawable(resArray);
this.imageIndicatorView.setIndicateStyle(ImageIndicatorView.INDICATE_USERGUIDE_STYLE); this.imageIndicatorView.setIndicateStyle(ImageIndicatorView.INDICATE_USERGUIDE_STYLE);
this.imageIndicatorView.show(); this.imageIndicatorView.show();

@ -32,7 +32,7 @@ public class ImageIndicatorActivity extends Activity {
} }
private void initView() { private void initView() {
final Integer[] resArray = new Integer[] { R.drawable.ic_launcher, R.drawable.ic_launcher }; final Integer[] resArray = new Integer[] { R.drawable.poster1, R.drawable.poster2, R.drawable.poster3 };
this.imageIndicatorView.setupLayoutByDrawable(resArray); this.imageIndicatorView.setupLayoutByDrawable(resArray);
this.imageIndicatorView.show(); this.imageIndicatorView.show();
} }

Loading…
Cancel
Save