请问 dialogapp乌木是什么么意思

Man&#8217;s new best friendGet the free app that helps you track your pet’s well-being<img src="https://www.petdialog.co.uk/wp-content/uploads/2015/06/cat1.jpg" alt="Keep on top of their lives(all 9 of them)">Keep on top of their lives(all 9 of them)Get the download on your cat’s health with the free PetDialog(TM) App
It&#8217;s a dog&#8217;s lifeGet the free app that helps you understand it
An app to create an even deeper bond
The PetDialog app gives you a unique insight into every aspect of your pet’s life
Record all of those amazing memories and your pet’s everyday life
Track your walks with GPS to see how much mileage you and your dog rack up
Capture that face when they’ve been caught red-handed
Share your pet’s adventures with your friends across your favourite social networks
Never forget important dates, such as vaccinations, flea treatments and birthdays
CONNECT WITH YOUR PET
AND WITH YOUR VET
Connect with your vet and access more features
As well as organising your pet’s life, the PetDialog app lets you connect with your local vet practice. Your vet will gain a better understanding of your pet by seeing details of their life through the app, ensuring your pet always receives the best professional advice and care.
Your vet will be able to send you appointment reminders, updates and other messages for you and your pet via your app, plus you’ll have easy access to handy information such as the practice opening hours and contact details.
CONNECT WITH YOUR PET
AND WITH YOUR VET
CONNECT WITH YOUR PET
AND WITH YOUR VET
Recent News
Now that most people have forgotten their new year’s resolutions and we can finally start looking ...Pet Behaviour #4 – How to overcome separation anxiety Separation anxiety can affect dogs in differ...There are so many benefits to doing yoga but any cat owner can tell you that it can be a nightmare t...
Now that most people have forgotten their new year’s resolutions and we can finally star...Pet Behaviour #4 – How to overcome separation anxiety Separation anxiety can affect dogs...There are so many benefits to doing yoga but any cat owner can tell you that it can be a n...
Join the growing PetDialog community
We&#8217;d love to get to know you and your pet
10538Total Users
12867Total Pets
Download the AppProgressBar和ProgressDialog和AlertDialog.Builder和App&Widget进度条(转)
多式样ProgressBar&
普通圆形ProgressBar&
<img src="/blog7style/images/common/sg_trans.gif" real_src ="/data/attachment/forum/month_ad853b2.png" ALT="1.png" WIDTH="318" STYLE="margin-top: 0 margin-right: 10 margin-bottom: 10 margin-left: 0 padding-top: 0 padding-right: 0 padding-bottom: 0 padding-left: 0 border-style: border-color: border-style: border-color: max-width: 550 float:"
TITLE="ProgressBar和ProgressDialog和AlertDialog.Builder和App&Widget进度条(转)" />
<img src="/blog7style/images/common/sg_trans.gif" real_src ="/data/attachment/forum/month_044ad8ae00e.png" ALT="4.png" WIDTH="315" STYLE="margin-top: 0 margin-right: 10 margin-bottom: 10 margin-left: 0 padding-top: 0 padding-right: 0 padding-bottom: 0 padding-left: 0 border-style: border-color: border-style: border-color: max-width: 550 float:"
TITLE="ProgressBar和ProgressDialog和AlertDialog.Builder和App&Widget进度条(转)" />
该类型进度条也就是一个表示运转的过程,例如发送短信,连接网络等等,表示一个过程正在执行中。
一般只要在XML布局中定义就可以了。
此时,没有设置它的风格,那么它就是圆形的,一直会旋转的进度条。
各大小样式圆形ProgressBar&
超大号圆形ProgressBar&
<img src="/blog7style/images/common/sg_trans.gif" real_src ="/data/attachment/forum/month_04438bcc9df.png" ALT="3.png" WIDTH="320" STYLE="margin-top: 0 margin-right: 10 margin-bottom: 10 margin-left: 0 padding-top: 0 padding-right: 0 padding-bottom: 0 padding-left: 0 border-style: border-color: border-style: border-color: max-width: 550 float:"
TITLE="ProgressBar和ProgressDialog和AlertDialog.Builder和App&Widget进度条(转)" />
此时,给设置一个style风格属性后,该ProgressBar就有了一个风格,这里大号ProgressBar的风格是:
完整XML定义是:
小号圆形ProgressBar&
<img src="/blog7style/images/common/sg_trans.gif" real_src ="/data/attachment/forum/month_044a499fe3d610ad906.png" ALT="5.png" WIDTH="317" STYLE="margin-top: 0 margin-right: 10 margin-bottom: 10 margin-left: 0 padding-top: 0 padding-right: 0 padding-bottom: 0 padding-left: 0 border-style: border-color: border-style: border-color: max-width: 550 float:"
TITLE="ProgressBar和ProgressDialog和AlertDialog.Builder和App&Widget进度条(转)" />
小号ProgressBar对应的风格是:
完整XML定义是:
标题型圆形ProgressBar&
<img src="/blog7style/images/common/sg_trans.gif" real_src ="/data/attachment/forum/month_044ec70aadfccf8d79b.png" ALT="6.png" WIDTH="319" STYLE="margin-top: 0 margin-right: 10 margin-bottom: 10 margin-left: 0 padding-top: 0 padding-right: 0 padding-bottom: 0 padding-left: 0 border-style: border-color: border-style: border-color: max-width: 550 float:"
TITLE="ProgressBar和ProgressDialog和AlertDialog.Builder和App&Widget进度条(转)" />
<img src="/blog7style/images/common/sg_trans.gif" real_src ="/data/attachment/forum/month_04471affa4bbacfc2ff.png" ALT="8.png" WIDTH="319" STYLE="margin-top: 0 margin-right: 10 margin-bottom: 10 margin-left: 0 padding-top: 0 padding-right: 0 padding-bottom: 0 padding-left: 0 border-style: border-color: border-style: border-color: max-width: 550 float:"
TITLE="ProgressBar和ProgressDialog和AlertDialog.Builder和App&Widget进度条(转)" />
标题型ProgressBar对应的风格是:
完整XML定义是:
代码中实现:
长形进度条&
布局中的长形进度条&
<img src="/blog7style/images/common/sg_trans.gif" real_src ="/data/attachment/forum/month_0442057dff7cfb83e57.png" ALT="2.png" WIDTH="320" STYLE="margin-top: 0 margin-right: 10 margin-bottom: 10 margin-left: 0 padding-top: 0 padding-right: 0 padding-bottom: 0 padding-left: 0 border-style: border-color: border-style: border-color: max-width: 550 float:"
TITLE="ProgressBar和ProgressDialog和AlertDialog.Builder和App&Widget进度条(转)" />
&#9312;首先在XML进行布局
style="?android:attr/progressBarStyleHorizontal"&
设置风格为长形&
android:max="100"& &
最大进度值为100
android:progress="50"&&
初始化的进度值
android:secondaryProgress="70"&
初始化的底层第二个进度值&
android:layout_gravity="center_vertical"&
&#9313;代码中运用
页面标题中的长形进度条&
<img src="/blog7style/images/common/sg_trans.gif" real_src ="/data/attachment/forum/month_52acf0772.png" ALT="7.png" WIDTH="319" STYLE="margin-top: 0 margin-right: 10 margin-bottom: 10 margin-left: 0 padding-top: 0 padding-right: 0 padding-bottom: 0 padding-left: 0 border-style: border-color: border-style: border-color: max-width: 550 float:"
TITLE="ProgressBar和ProgressDialog和AlertDialog.Builder和App&Widget进度条(转)" />
代码实现:
&#9312;先设置一下窗口风格特性
&#9313;然后设置进度值
ProgressDialog
ProgressDialog中的圆形进度条&<img src="/blog7style/images/common/sg_trans.gif" real_src ="/data/attachment/forum/month_cf872924.png" ALT="device-ra.png" WIDTH="320" STYLE="margin-top: 0 margin-right: 10 margin-bottom: 10 margin-left: 0 padding-top: 0 padding-right: 0 padding-bottom: 0 padding-left: 0 border-style: border-color: border-style: border-color: max-width: 550 float:"
TITLE="ProgressBar和ProgressDialog和AlertDialog.Builder和App&Widget进度条(转)" />&&&<img src="/blog7style/images/common/sg_trans.gif" real_src ="/data/attachment/forum/month_047fba42.png" ALT="device-rb.png" WIDTH="320" STYLE="margin-top: 0 margin-right: 10 margin-bottom: 10 margin-left: 0 padding-top: 0 padding-right: 0 padding-bottom: 0 padding-left: 0 border-style: border-color: border-style: border-color: max-width: 550 float:"
TITLE="ProgressBar和ProgressDialog和AlertDialog.Builder和App&Widget进度条(转)" />&&&
ProgressDialog一般用来表示一个系统任务或是开启任务时候的进度,有一种稍等的意思。
代码实现:
ProgressDialog中的长形进度条&
<img src="/blog7style/images/common/sg_trans.gif" real_src ="/data/attachment/forum/month_dae3d8e54.png" ALT="device-ca.png" WIDTH="320" STYLE="margin-top: 0 margin-right: 10 margin-bottom: 10 margin-left: 0 padding-top: 0 padding-right: 0 padding-bottom: 0 padding-left: 0 border-style: border-color: border-style: border-color: max-width: 550 float:"
TITLE="ProgressBar和ProgressDialog和AlertDialog.Builder和App&Widget进度条(转)" />
<img src="/blog7style/images/common/sg_trans.gif" real_src ="/data/attachment/forum/month_c9eb92d46.png" ALT="device-cb.png" WIDTH="320" STYLE="margin-top: 0 margin-right: 10 margin-bottom: 10 margin-left: 0 padding-top: 0 padding-right: 0 padding-bottom: 0 padding-left: 0 border-style: border-color: border-style: border-color: max-width: 550 float:"
TITLE="ProgressBar和ProgressDialog和AlertDialog.Builder和App&Widget进度条(转)" />&
代码实现:
AlertDialog.Builder&
AlertDialog中的圆形ProgressBar&
<img src="/blog7style/images/common/sg_trans.gif" real_src ="/data/attachment/forum/month_05228bdc86ae40319bf.png" ALT="device-ma.png" WIDTH="320" STYLE="margin-top: 0 margin-right: 10 margin-bottom: 10 margin-left: 0 padding-top: 0 padding-right: 0 padding-bottom: 0 padding-left: 0 border-style: border-color: border-style: border-color: max-width: 550 float:"
TITLE="ProgressBar和ProgressDialog和AlertDialog.Builder和App&Widget进度条(转)" />
&#9312;先来设计一个Layout,待会儿作为一个View,加入AlertDialog.Builder
&#9313;代码罗
AlertDialog中的长形ProgressBar(可控制)&
<img src="/blog7style/images/common/sg_trans.gif" real_src ="/data/attachment/forum/month_ed552dbce.png" ALT="device-mb.png" WIDTH="320" STYLE="margin-top: 0 margin-right: 10 margin-bottom: 10 margin-left: 0 padding-top: 0 padding-right: 0 padding-bottom: 0 padding-left: 0 border-style: border-color: border-style: border-color: max-width: 550 float:"
TITLE="ProgressBar和ProgressDialog和AlertDialog.Builder和App&Widget进度条(转)" />
&#9312;先来设计一个Layout,待会儿作为一个View,加入AlertDialog.Builder
&#9313;代码罗
&#9314;进度条进度值的按钮事件
App Widget中的进度条&
Widget中的圆形ProgressBar&
这个很简单,在Widget中没有多大意思,不再敷述。
Widget中的长形ProgressBar(可控制)&
<img src="/blog7style/images/common/sg_trans.gif" real_src ="/data/attachment/forum/month_056f12ba69f2dc3781c.png" ALT="device-widget.png" WIDTH="320" STYLE="margin-top: 0 margin-right: 10 margin-bottom: 10 margin-left: 0 padding-top: 0 padding-right: 0 padding-bottom: 0 padding-left: 0 border-style: border-color: border-style: border-color: max-width: 550 float:"
TITLE="ProgressBar和ProgressDialog和AlertDialog.Builder和App&Widget进度条(转)" />
Widget的实现就不再重复,假设您已经把Widget布局,相应设置已经设置好了。也可以在桌面加入类似上面图中的样式。
现在我们来实现一下按钮事件,与进度条的交互。
下面还是简单讲解一下Widget的设计与部署。
&#9312;设计Widget布局
&#9313;新增一个.res/xml目录,加入appwidget-provider
&#9314;实现一个AppWidgetProvider子类
&#9315;配置Manifest,进行注册
这里实现按钮与进度条的交互。(Widget自己广播发送与接收)
&#9312;按钮的消息发送
&#9313;Widget自身消息接收,使用intent.getAction()来获取Action
&#9314;进度条的进度值设置
注意了,Widget自身的onReceive()方法如果要接收其他的Action广播。那就必须在Manifest中,在Intent-filter中添加Action:
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。Android开发:Parallax效果的ScrollerView,改编自ParallaxListView
最近在项目中,有用到一个仿照Path的Parallax效果,苦苦搜寻,在github上面,有一个类似的效果,不过是listview的,加一个顶部的headerView,实现了该效果,不过我需要的是ScrollerView的,于是对该代码进行的修改,实现了ScrollerView下面的Parallax效果,效果图参照如下:
在阅读下面代码前,可以先查看下Github上面的
我对于原先的代码进行了大量的删减,只实现了我需要的效果,看起来简单易懂,最怕那种绕来绕去的代码了,看核心的实现代码:
public class ParallaxScollView extends ScrollView implements OnScrollListener {
public final static double NO_ZOOM = 1;
public final static double ZOOM_X2 = 2;
private ImageView mImageV
private int mImageViewHeight = -1;
private int mDefaultImageViewHeight = 0;
private int originImageViewH
private int mMaxH
private interface OnOverScrollByListener {
public boolean overScrollBy(int deltaX, int deltaY, int scrollX,
int scrollY, int scrollRangeX, int scrollRangeY,
int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent);
private interface OnTouchEventListener {
public void onTouchEvent(MotionEvent ev);
public ParallaxScollView(Context context, AttributeSet attrs,
int defStyle) {
super(context, attrs, defStyle);
init(context);
public ParallaxScollView(Context context, AttributeSet attrs) {
super(context, attrs);
init(context);
public ParallaxScollView(Context context) {
super(context);
init(context);
public void init(Context context) {
mDefaultImageViewHeight = context.getResources().getDimensionPixelSize(R.dimen.size_default_height);
originImageViewHeight = context.getResources().getDimensionPixelSize(R.dimen.size_default_height);
public void onScrollStateChanged(AbsListView view, int scrollState) {
protected boolean overScrollBy(int deltaX, int deltaY, int scrollX,
int scrollY, int scrollRangeX, int scrollRangeY,
int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) {
boolean isCollapseAnimation =
isCollapseAnimation = scrollByListener.overScrollBy(deltaX, deltaY,
scrollX, scrollY, scrollRangeX, scrollRangeY, maxOverScrollX,
maxOverScrollY, isTouchEvent)
|| isCollapseA
/*return isCollapseAnimation ? true : super.overScrollBy(deltaX, deltaY,
scrollX, scrollY, scrollRangeX, scrollRangeY, maxOverScrollX,
0, isTouchEvent);*/
public void onScroll(AbsListView view, int firstVisibleItem,
int visibleItemCount, int totalItemCount) {
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
View firstView = (View) mImageView.getParent();
// firstView.getTop & getPaddingTop means mImageView will be covered by top padding,
// so we can layout it to make it shorter
if (firstView.getTop() & getPaddingTop() && mImageView.getHeight() & mImageViewHeight) {
mImageView.getLayoutParams().height = Math.max(mImageView.getHeight() - (getPaddingTop() - firstView.getTop()), mImageViewHeight);
// to set the firstView.mTop to 0,
// maybe use View.setTop() is more easy, but it just support from
3.0 (API 11)
firstView.layout(firstView.getLeft(), 0, firstView.getRight(), firstView.getHeight());
mImageView.requestLayout();
public boolean onTouchEvent(MotionEvent ev) {
touchListener.onTouchEvent(ev);
return super.onTouchEvent(ev);
public void setParallaxImageView(ImageView iv) {
mImageView =
mImageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
public void setViewsBounds(double zoomRatio) {
if (mImageViewHeight == -1) {
mImageViewHeight = mImageView.getHeight();
if (mImageViewHeight &= 0) {
mImageViewHeight = mDefaultImageViewH
double ratio = ((double) mImageView.getDrawable().getIntrinsicWidth()) / ((double) mImageView.getWidth());
private OnOverScrollByListener scrollByListener = new OnOverScrollByListener() {
public boolean overScrollBy(int deltaX, int deltaY, int scrollX,
int scrollY, int scrollRangeX, int scrollRangeY,
int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) {
if (isTouchEvent) {
if (true) {
mImageView.getLayoutParams().height = mImageView.getHeight() - deltaY / 2;
mImageView.requestLayout();
private OnTouchEventListener touchListener = new OnTouchEventListener() {
public void onTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_UP) {
if (mImageViewHeight - 1 & mImageView.getHeight()) {
ResetAnimimation animation = new ResetAnimimation(
mImageView, mImageViewHeight);
animation.setDuration(300);
mImageView.startAnimation(animation);
public class ResetAnimimation extends Animation {
int targetH
int originalH
int extraH
protected ResetAnimimation(View view, int targetHeight) {
this.mView =
this.targetHeight = targetH
originalHeight = view.getHeight();
extraHeight = this.originalHeight - originImageViewH
Log.i(debug, target heitht
+ targetHeight +
original height
+ originalHeight
extraheight
+ extraHeight);
protected void applyTransformation(float interpolatedTime, Transformation t) {
newHeight = (int) (originImageViewHeight + extraHeight * (1 - interpolatedTime));
mView.getLayoutParams().height = newH
mView.requestLayout();
第二布:在xml中,引用该ParallaxScollView:
最后一步,在activity中,引用ParallaxScrollerView,并且设置imageview:
mImageView = (ImageView) findViewById(R.id.headview);
scrollView = (ParallaxScollView) findViewById(R.id.parallax_scroll_view);
scrollView.setParallaxImageView(mImageView);
大功告成,也可以在ScrollerView上实现炫酷的Parallax效果了
(window.slotbydup=window.slotbydup || []).push({
id: '2467140',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467141',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467143',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467148',
container: s,
size: '1000,90',
display: 'inlay-fix'

我要回帖

更多关于 乌木是什么 的文章

 

随机推荐