实现代码:
frameworks/base/core/java/com/android/internal/app/PlatLogoActivity.java
public class PlatLogoActivity extends Activity {
Toast mToast;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mToast = Toast.makeText(this, "Zombie art by Jack Larson", Toast.LENGTH_SHORT);
ImageView content = new ImageView(this);
content.setImageResource(com.android.internal.R.drawable.platlogo);
content.setScaleType(ImageView.ScaleType.FIT_CENTER);
setContentView(content);
}
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_UP) {
mToast.show();
}
return super.dispatchTouchEvent(ev);
}
}
图片位置:
frameworks/base/core/res/res/drawable-nodpi/platlogo.jpg
frameworks/base/core/java/com/android/internal/app/PlatLogoActivity.java
public class PlatLogoActivity extends Activity {
Toast mToast;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mToast = Toast.makeText(this, "Zombie art by Jack Larson", Toast.LENGTH_SHORT);
ImageView content = new ImageView(this);
content.setImageResource(com.android.internal.R.drawable.platlogo);
content.setScaleType(ImageView.ScaleType.FIT_CENTER);
setContentView(content);
}
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_UP) {
mToast.show();
}
return super.dispatchTouchEvent(ev);
}
}
图片位置:
frameworks/base/core/res/res/drawable-nodpi/platlogo.jpg