1.安卓android开发
File dir = new File(FILE_DIR); if (!dir.exists()) { dir.mkdirs(); } File bitmapFile = new File(FILE_DIR + bitmapName); if (!bitmapFile.exists()) { bitmapFile.createNewFile(); } FileOutputStream fos = new FileOutputStream(bitmapFile); bitmap.compress(Bitmap.CompressFormat.PNG, 100, fos);// PNG是透明的,JPEG则是不透明的 fos.close(); 这是我从我代码里贴的,希望可以帮助到你。
2.关于android毕业设计论文有哪些
1.撰写毕业论文是检验学生在校学习成果的重要措施,也是提高教学质量的重要环节。大学生在毕业前都必须完成毕业论文的撰写任务。申请学位必须提交相应的学位论文,经答辩通过后,方可取得学位。可以这么说,毕业论文是结束大学学习生活走向社会的一个中介和桥梁。毕业论文是大学生才华的第一次显露,是向祖国和人民所交的一份有份量的答卷,是投身社会主义现代化建设事业的报到书。一篇毕业论文虽然不能全面地反映出一个人的才华,也不一定能对社会直接带来巨大的效益,对专业产生开拓性的影响。实践证明,撰写毕业论文是提高教学质量的重要环节,是保证出好人才的重要措施。
2.通过撰写毕业论文,提高写作水平是干部队伍“四化”建设的需要。党中央要求,为了适应现代化建设的需要,领导班子成员应当逐步实现“革命化、年轻化、知识化、专业化”。这个“四化”的要求,也包含了对干部写作能力和写作水平的要求。
3.提高大学生的写作水平是社会主义物质文明和精神文明建设的需要。在新的历史时期,无论是提高全族的科学文化水平,掌握现代科技知识和科学管理方法,还是培养社会主义新人,都要求我们的干部具有较高的写作能力。在经济建设中,作为领导人员和机关的办事人员,要写指示、通知、总结、调查报告等应用文;要写说明书、广告、解说词等说明文;还要写科学论文、经济评论等议论文。在当今信息社会中,信息对于加快经济发展速度,取得良好的经济效益发挥着愈来愈大的作用。写作是以语言文字为信号,是传达信息的方式。信息的来源、信息的收集、信息的储存、整理、传播等等都离不开写作。
3.Android开发图片滚屏效果的实现
继承自SurfaceView 类写的,不过没有图片 public class RandomSurfaceView2 extends SurfaceView implements Callback,Runnable{ private SurfaceHolder sfh; private Paint paintCurrent; private Paint paintLeft; private Paint paintRight; private Thread th; private boolean flag; private Canvas canvas; private int ScreenW, ScreenH; private float currentLeft; private float currentRight; private float currentTop; private float currentBottom; private float leftLeft; private float leftRight; private float leftTop; private float leftBottom; private float rightLeft; private float rightRight; private float rightTop; private float rightBottom; private boolean leftMove; private int ScreenX; private int ScreenY; public RandomSurfaceView2(Context context) { super(context); sfh = this.getHolder(); sfh.addCallback(this); paintCurrent = new Paint(); paintCurrent.setColor(Color.RED); paintCurrent.setAntiAlias(true); paintLeft = new Paint(); paintLeft.setColor(Color.GREEN); paintLeft.setAntiAlias(true); paintRight = new Paint(); paintRight.setColor(Color.BLUE); paintRight.setAntiAlias(true); setFocusable(true); } @Override public void run() { while (flag) { long start = System.currentTimeMillis(); logic(); myDraw(); long end = System.currentTimeMillis(); try { if (end - start Thread.sleep(50 - (end - start)); } } catch (InterruptedException e) { e.printStackTrace(); } } } private void logic() { if(leftMove) { if(leftLeft { leftLeft = 900; leftRight = 1300; }else { leftLeft -= 50; leftRight -= 50; if(leftLeft == 200) { leftTop = 60; leftBottom = 360; leftMove =false; }else{ leftTop = 100; leftBottom = 400; } } if(currentLeft { currentLeft = 900; currentRight = 1300; }else { currentLeft -= 50; currentRight -= 50; if(currentLeft == 200) { currentTop = 60; currentBottom = 360; leftMove =false; }else{ currentTop = 100; currentBottom = 400; } } if(rightLeft { rightLeft = 900; rightRight = 1300; }else { rightLeft -= 50; rightRight -= 50; if(rightLeft == 200) { rightTop = 60; rightBottom = 360; leftMove =false; }else{ rightTop = 100; rightBottom = 400; } } } } @Override public void surfaceCreated(SurfaceHolder holder) { ScreenW = this.getWidth(); ScreenH = this.getHeight(); // currentLeft = 200; currentTop = 60; currentRight = 600; currentBottom = 360; leftLeft = -250; leftTop = 100; leftRight = 150; leftBottom = 400; rightLeft = 650; rightTop = 100; rightRight = 1050; rightBottom = 400; flag = true; leftMove = false; ScreenW = this.getWidth(); ScreenH = this.getHeight(); th = new Thread(this); th.start(); } public void myDraw() { try { canvas = sfh.lockCanvas(); if(canvas != null) { canvas.drawColor(Color.CYAN); canvas.save(); //设置画布大小 canvas.clipRect(0,0, ScreenW, ScreenH); canvas.drawRect(currentLeft, currentTop, currentRight, currentBottom, paintCurrent); canvas.drawRect(leftLeft, leftTop, leftRight, leftBottom, paintLeft); canvas.drawRect(rightLeft, rightTop, rightRight, rightBottom, paintRight); canvas.restore(); } } catch (Exception e) { // TODO: handle exception } finally{ if(canvas != null) { sfh.unlockCanvasAndPost(canvas); } } } @Override public void surfaceDestroyed(SurfaceHolder holder) { } @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { } @Override public boolean onTouchEvent(MotionEvent event) { int selectX = (int)event.getX(); int selectY = (int)event.getY(); //玩家手指点击屏幕的动作 if (selectX { leftMove = true; } return true; } } 程序入口 public class MainActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //隐去状态栏 this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); //隐去标题栏 requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(new RandomSurfaceView2(this)); //设置横屏 (ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); } }。
转载请注明出处众文网 » android特效处理毕业论文