Bitmap buffer = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_4444); buffer.eraseColor(Color.TRANSPARENT);
Intent intent = new Intent(Intent.ACTION_SENDTO, Uri .fromParts("mailto", "test@test.com", null));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
WindowManager.LayoutParams lp = getWindow().getAttributes(); lp.screenBrightness = 100 / 100.0f; getWindow().setAttributes(lp);
Filter filter = myAdapter.getFilter(); filter.filter(mySearchText);
setOnScrollListener(new OnScrollListener(){
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
// TODO Auto-generated method stub }
public void onScrollStateChanged(AbsListView view, int scrollState) {
// TODO Auto-generated method stub
if(scrollState == 0) Log.i("a", "scrolling stopped..."); } });}
Bitmap bmp = getImageBitmap(jpg); String path = getFilesDir().getAbsolutePath() + "/test.png"; File file = new File(path); FileOutputStream fos = new FileOutputStream(file); bmp.compress( CompressFormat.PNG, 100, fos ); fos.close(); Intent intent = new Intent(); intent.setAction(android .content.Intent.ACTION_VIEW); intent.setDataAndType(Uri .fromFile(new File(path)), "image/png"); startActivity(intent);
Intent intent = new Intent();
intent.setAction(android .content.Intent.ACTION_VIEW);
File file = new File("/sdcard/test.mp4");
intent.setDataAndType(Uri .fromFile(file), "video/*");
startActivity(intent);
Intent intent = new Intent();
intent.setAction(android .content.Intent.ACTION_VIEW);
File file = new File("/sdcard/test.mp3");
intent.setDataAndType(Uri .fromFile(file), "audio/*");
startActivity(intent);
setTextAppearance(context, android .R.style.TextAppearance_Medium); android :textAppearance="?android :attr/textAppearanceMedium"
<activity android :name=".ArtistActivity" android :label="Artist" android :launchMode="singleTop"> </activity>
Intent i = new Intent(); i.putExtra(EXTRA_KEY_ARTIST, id); i.setClass(this, ArtistActivity.class); i.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); startActivity(i);
Bitmap myCoolBitmap = ... ; int w = myCoolBitmap.getWidth(), h = myCoolBitmap.getHeight(); Bitmap rounder = Bitmap.createBitmap(w,h,Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(rounder); Paint xferPaint = new Paint(Paint.ANTI_ALIAS_FLAG); xferPaint.setColor(Color.RED); canvas.drawRoundRect(new RectF(0,0,w,h), 20.0f, 20.0f, xferPaint); xferPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_IN)); //然后呢实现 canvas.drawBitmap(myCoolBitmap, 0,0, null); canvas.drawBitmap(rounder, 0, 0, xferPaint);
Notification notification = new Notification (icon, tickerText, when); notification .number = 4;
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android ="http://schemas.android .com/apk/res/android " android :shape="rectangle">
<gradient android :startColor="#FFFFFFFF" android :endColor="#FFFF0000"
android :angle="270"/>
</shape>
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="NewTheme" parent="android :Theme"> <item name="android :background">@drawable/shape</item> </style> </resources>
<activity android :name=".ShapeDemo" android :theme="@style/NewTheme">
<?php xml version="1.0" ?> ? <response> <error>1</error> <message>Invalid URL.</message> </response>
public class MyApplication extends Application{
private String thing = null;
public String getThing(){
return thing;
}
public void setThing( String thing ){
this.thing = thing;
}
}
public class MyActivity extends Activity {
private MyApplication app;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
app = ((MyApplication)getApplication());
String thing = app.getThing();
}
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有