android 中仿QQ显示说说 用什么控件

android 中仿QQ显示说说 用什么控件,第1张

这个属于调用系统相册陵态大和系统相机进行图片选择的问题

客服端代码:尺竖

[java] view plaincopyprint?

01.package com.cn.lxz.zhaopian

02.

03.import java.io.File

04.import java.io.IOException

05.import java.text.SimpleDateFormat

06.import java.util.Date

07.import java.util.HashMap

08.import java.util.Map

09.

10.import lxz.utils.android.graphics.GraphicsBitmapUtils

11.import lxz.utils.android.net.UploadFile

12.import lxz.utils.android.resource.AndroidClass

13.

14.import android.app.Activity

15.import android.app.AlertDialog

16.import android.content.DialogInterface

17.import android.content.DialogInterface.OnClickListener

18.import android.content.Intent

19.import android.content.res.Resources

20.import android.graphics.Bitmap

21.import android.graphics.drawable.BitmapDrawable

22.import android.graphics.drawable.Drawable

23.import android.net.Uri

24.import android.os.Bundle

25.import android.os.Environment

26.import android.os.Handler

27.import android.os.Message

28.import android.provider.MediaStore

29.import android.view.View

30.import android.widget.Button

31.import android.widget.EditText

32.import android.widget.ImageView

33.import android.widget.Toast

34.

35.public class Activity_UploadPic extends Activity implements Handler.Callback {

36./** Called when the activity is first created. */

37.

38.ImageView view_pic

39.Button view_btn

40.EditText view_et

41.// 线程通知上传成功

42.final Handler upLoadhand = new Handler(this)

43.String[] arrayString = { "拍照", "相册" }

44.String title = "上传照片"

45.

46.// 上传的地址

47.String uploadUrl = "http://192.168.1.101:8080/UploadServlet/UploadServlet?"

48.String filename = "照片闭庆"

49.private static final int PHOTO_REQUEST_TAKEPHOTO = 1// 拍照

50.private static final int PHOTO_REQUEST_GALLERY = 2// 从相册中选择

51.private static final int PHOTO_REQUEST_CUT = 3// 结果

52.

53.@Override

54.public boolean handleMessage(Message msg) {

55.

56.if (msg.obj != null) {

57.Drawable drawable = new BitmapDrawable((Bitmap) msg.obj)

58.view_pic.setBackgroundDrawable(drawable)

59.Toast.makeText(this, "获得图片并且头像上传成功", 3).show()

60.}else

61.{

62.Toast.makeText(this, "获得图片,但是头像上传失败,请注意配置uploadUrl上传地址", 3).show()

63.}

64.

65.return false

66.}

67.

68.// 创建一个以当前时间为名称的文件

69.File tempFile = new File(Environment.getExternalStorageDirectory(),

70.getPhotoFileName())

71.

72.// 对话框

73.OnClickListener onDialogClick = new OnClickListener() {

74.@Override

75.public void onClick(DialogInterface dialog, int which) {

76.switch (which) {

77.case 0:

78.startCamearPicCut(dialog)// 开启照相

79.break

80.case 1:

81.startImageCaptrue(dialog)// 开启图库

82.break

83.default:

84.break

85.}

86.}

87.

88.private void startCamearPicCut(DialogInterface dialog) {

89.// TODO Auto-generated method stub

90.dialog.dismiss()

91.// 调用系统的拍照功能

92.Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE)

93.

94.intent.putExtra("camerasensortype", 2)// 调用前置摄像头

95.intent.putExtra("autofocus", true)// 自动对焦

96.intent.putExtra("fullScreen", false)// 全屏

97.intent.putExtra("showActionIcons", false)

98.// 指定调用相机拍照后照片的储存路径

99.intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(tempFile))

100.startActivityForResult(intent, PHOTO_REQUEST_TAKEPHOTO)

101.}

102.

103.private void startImageCaptrue(DialogInterface dialog) {

104.// TODO Auto-generated method stub

105.dialog.dismiss()

106.Intent intent = new Intent(Intent.ACTION_PICK, null)

107.intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,

108."image/*")

109.startActivityForResult(intent, PHOTO_REQUEST_GALLERY)

110.}

111.}

112.

113.@Override

114.public void onCreate(Bundle savedInstanceState) {

115.super.onCreate(savedInstanceState)

116.setContentView(R.layout.main)

117.init()

118.

119.}

120.

121.private void init() {

122.// TODO Auto-generated method stub

123.view_pic = (ImageView) findViewById(R.id.iv)

124.view_btn = (Button) findViewById(R.id.btn)

125.view_et = (EditText) findViewById(R.id.et)

126.view_btn.setOnClickListener(new View.OnClickListener() {

127.

128.@Override

129.public void onClick(View v) {

130.// TODO Auto-generated method stub

131.AlertDialog.Builder dialog = AndroidClass.getListDialogBuilder(

132.Activity_UploadPic.this, arrayString, title,

133.onDialogClick)

134.dialog.show()

135.}

136.})

137.}

138.

139.// 使用系统当前日期加以调整作为照片的名称

140.private String getPhotoFileName() {

141.Date date = new Date(System.currentTimeMillis())

142.SimpleDateFormat dateFormat = new SimpleDateFormat(

143."'IMG'_yyyyMMdd_HHmmss")

144.return dateFormat.format(date) + ".jpg"

145.}

146.

147.@Override

148.protected void onActivityResult(int requestCode, int resultCode, Intent data) {

149.super.onActivityResult(requestCode, resultCode, data)

150.switch (requestCode) {

151.case PHOTO_REQUEST_TAKEPHOTO:

152.startPhotoZoom(Uri.fromFile(tempFile), 150)

153.break

154.

155.case PHOTO_REQUEST_GALLERY:

156.if (data != null) {

157.startPhotoZoom(data.getData(), 150)

158.}

159.break

160.

161.case PHOTO_REQUEST_CUT:

162.if (data != null) {

163.setPicToView(data)

164.}

165.break

166.}

167.super.onActivityResult(requestCode, resultCode, data)

168.}

169.

170.private void startPhotoZoom(Uri uri, int size) {

171.Intent intent = new Intent("com.android.camera.action.CROP")

172.intent.setDataAndType(uri, "image/*")

173.// crop为true是设置在开启的intent中设置显示的view可以剪裁

174.intent.putExtra("crop", "true")

175.

176.// aspectX aspectY 是宽高的比例

177.intent.putExtra("aspectX", 1)

178.intent.putExtra("aspectY", 1)

179.

180.// outputX,outputY 是剪裁图片的宽高

181.intent.putExtra("outputX", size)

182.intent.putExtra("outputY", size)

183.intent.putExtra("return-data", true)

184.

185.startActivityForResult(intent, PHOTO_REQUEST_CUT)

186.}

187.

188.// 将进行剪裁后的图片显示到UI界面上

189.private void setPicToView(Intent picdata) {

190.Bundle bundle = picdata.getExtras()

191.if (bundle != null) {

192.final Bitmap photo = bundle.getParcelable("data")

193.

194.new Thread() {

195.

196.@Override

197.public void run() {

198.byte[] photodata = GraphicsBitmapUtils.Bitmap2Bytes(photo)

199.UploadFile uploadFile = new UploadFile(uploadUrl)

200.Map parameters = new HashMap()

201.parameters.put("msg", view_et.getText().toString())

202.

203.boolean isUploadSuccess = false

204.

205.try {

206.isUploadSuccess = uploadFile.defaultUploadMethod(

207.photodata, filename, parameters)

208.} catch (IOException e) {

209.// TODO Auto-generated catch block

210.e.printStackTrace()

211.}

212.

213.if (isUploadSuccess) {

214.upLoadhand.obtainMessage(0, photo).sendToTarget()

215.} else {

216.upLoadhand.obtainMessage(-1, null).sendToTarget()

217.}

218.

219.}

220.}.start()

221.

222.}

223.}

224.

225.}

登陆进入自己的QQ空间,点击自定义,然后在QQ空间地址栏输入以游侍消下免费代码。

输入代码看到效果后,接着随便移动一下模块,最后点保存方案即可。

QQ空间免费挂件代码:

javascript:window.top.space_addItem(2,5875,0,0,1,1,0)

javascript:window.top.space_addItem(2,5876,0,0,1,1,0)

javascript:window.top.space_addItem(2,5877,0,0,1,1,0)

javascript:window.top.space_addItem(2,5878,0,0,1,1,0)

javascript:window.top.space_addItem(2,5879,0,0,1,1,0)

javascript:window.top.space_addItem(2,5880,0,0,1,1,0)

javascript:window.top.space_addItem(2,5881,0,0,1,1,0)

javascript:window.top.space_addItem(16,14430,0,0,200,200,0)

javascript:window.top.space_addItem(16,14431,0,0,200,200,0)

javascript:window.top.space_addItem(16,14429,0,0,200,200,0)

javascript:window.top.space_addItem(16,14428,0,0,200,200,0)

javascript:window.top.space_addItem(2,5875,0,0,1,1,0)

QQ空间皮肤代码

黑暗世界

javascript:window.top.space_addItem(1,9475,0,0,1,1,94)

快乐十分

javascript:window.top.space_addItem(1,8674,0,80,100,100,94)

静悄悄

javascript:window.top.space_addItem(1,8669,100,80,100,100,94)

蓝色

javascript:window.top.space_addItem(1,11762,0,0,96,96,94)

全红

javascript:window.top.space_addItem(1,11273,0,80,0,0,93)

可爱_浪漫

javascript:window.top.space_addItem(1,4703,0,80,0,0,94)

浪漫爱情

javascript:window.top.space_addItem(1,7513,0,80,0,0,94)

免费黑色皮肤代码

javascript:window.top.space_addItem(1,12736,0,80,0,0,93)

黄色免费皮肤代码

javascript:window.top.space_addItem(1,7513,0,80,0,0,93)

紫色免费谈滚皮肤代码

javascript:window.top.space_addItem(1,7510,0,80,0,0,93)

绿色神知免费皮肤代码

javascript:window.top.space_addItem(1,7619,0,80,0,0,93)

白色免费皮肤代码

javascript:window.top.space_addItem(1,4703,0,80,0,0,94)

灰色免费皮肤代码

javascript:window.top.space_addItem(1,6300,0,0,0,0,1)

灰色免费皮肤代码(小窝)

javascript:window.top.space_addItem(1,2882,0,0,0,1,1)

强生可伶可俐

javascript:window.top.space_addItem(1,10425,0,0,0,1,1)

强生可伶可俐 两个美女

javascript:window.top.space_addItem(1,10144,0,0,0,1,0)

强生广告美女 一个美女

javascript:window.top.space_addItem(1,11762,0,0,0,1,1)

全屏 天蓝色

javascript:window.top.space_addItem(1,11762,0,0,0,1,94)

玫瑰花javascript:window.top.space_addItem(1,8669,100,80,100,100,123)字串2

静悄悄 javascript:window.top.space_addItem(1,8669,100,80,100,100,94)(带花、居中)

快乐十分javascript:window.top.space_addItem(1,8674,0,80,100,100,94)(彩虹)

迷失世界javascript:window.top.space_addItem(1,9475,0,0,1,1,94)(这个是黑的)

蓝色 javascript:window.top.space_addItem(1,11762,0,0,96,96,94)(蓝的)

睡美人(很漂亮)javascript:window.top.space_addItem(13,9758,0,0,200,600,0)

白色可爱风格:javascript:window.top.space_addItem(1,4703,0,80,0,0,94)字串8

浪漫爱情系列:javascript:window.top.space_addItem(1,7513,0,80,0,0,94)

全红免费皮肤:javascript:window.top.space_addItem(1,11273,0,80,0,0,93)

全橙样式:javascript:window.top.space_addItem(1,15306,0,80,0,0,93)

全蓝样式:javascript:window.top.space_addItem(1,15116,0,80,0,0,93)

全紫样式:javascript:window.top.space_addItem(1,15116,0,80,0,0,93)

淡淡粉色:javascript:window.top.space_addItem(1,7513,0,80,0,0,93)

全绿样式:javascript:window.top.space_addItem(1,7619,0,80,0,0,93)

字串7

javascript:window.top.space_addItem(2,5876,0,0,1,1,0)

javascript:window.top.space_addItem(2,5877,0,0,1,1,0)

javascript:window.top.space_addItem(2,5878,0,0,1,1,0)

字串4

javascript:window.top.space_addItem(1,9465,0,80,0,0,90)

javascript:window.top.space_addItem(1,9361,0,80,0,0,90)

javascript:window.top.space_addItem(1,9362,0,80,0,0,90)

javascript:window.top.space_addItem(1,8980,0,80,0,0,90)

javascript:window.top.space_addItem(1,8974,0,80,0,0,90)

javascript:window.top.space_addItem(1,8032,0,80,0,0,90)

javascript:window.top.space_addItem(1,7981,0,80,0,0,90)

javascript:window.top.space_addItem(1,7288,0,80,0,0,90)

javascript:window.top.space_addItem(1,7182,0,80,0,0,90)

javascript:window.top.space_addItem(1,7183,0,80,0,0,90)

javascript:window.top.space_addItem(1,6729,0,80,0,0,90)

javascript:window.top.space_addItem(1,6549,0,80,0,0,90)

javascript:window.top.space_addItem(1,6550,0,80,0,0,90)

javascript:window.top.space_addItem(1,6551,0,80,0,0,90)

javascript:window.top.space_addItem(1,6552,0,80,0,0,90)猪

javascript:window.top.space_addItem(1,6553,0,80,0,0,90)

javascript:window.top.space_addItem(1,6554,0,80,0,0,90)

javascript:window.top.space_addItem(1,6556,0,80,0,0,90)

javascript:window.top.space_addItem(1,6557,0,80,0,0,90)

javascript:window.top.space_addItem(1,6559,0,80,0,0,90)

javascript:window.top.space_addItem(1,6398,0,80,0,0,90)

javascript:window.top.space_addItem(1,6399,0,80,0,0,90)

javascript:window.top.space_addItem(1,6400,0,80,0,0,90)还好

javascript:window.top.space_addItem(1,6401,0,80,0,0,90)

javascript:window.top.space_addItem(1,6274,0,80,0,0,90)

javascript:window.top.space_addItem(1,6071,0,80,0,0,90)

javascript:window.top.space_addItem(1,3675,0,80,0,0,90)

javascript:window.top.space_addItem(1,2942,0,80,0,0,90)

javascript:window.top.space_addItem(1,2875,0,80,0,0,90)

javascript:window.top.space_addItem(1,2877,0,80,0,0,90)

javascript:window.top.space_addItem(1,2876,0,80,0,0,90)

javascript:window.top.space_addItem(1,2668,0,80,0,0,90)

javascript:window.top.space_addItem(1,2468,0,80,0,0,90)

javascript:window.top.space_addItem(1,2467,0,80,0,0,90)

javascript:window.top.space_addItem(1,2464,0,80,0,0,90)

javascript:window.top.space_addItem(1,2465,0,80,0,0,90)

javascript:window.top.space_addItem(1,2466,0,80,0,0,90)

javascript:window.top.space_addItem(1,3785,0,80,0,0,90)

javascript:window.top.space_addItem(1,3677,0,80,0,0,90)

javascript:window.top.space_addItem(1,3206,0,80,0,0,90)

javascript:window.top.space_addItem(1,1028,0,80,0,0,90)

javascript:window.top.space_addItem(1,1770,0,80,0,0,90)

javascript:window.top.space_addItem(1,1773,0,80,0,0,90)

javascript:window.top.space_addItem(1,1109,0,80,0,0,90)

javascript:window.top.space_addItem(1,1629,0,80,0,0,90)

javascript:window.top.space_addItem(1,1113,0,80,0,0,90)

javascript:window.top.space_addItem(1,1108,0,80,0,0,90)

javascript:window.top.space_addItem(1,1107,0,80,0,0,90)

javascript:window.top.space_addItem(1,1034,0,80,0...(

javascript:window.top.space_addItem(1,15306,0,0,1,1,94)QQ这声

QQ三国官方皮肤 javascript:window.top.space_addItem(1,15166,0,80,0,0,94)

夜光 javascript:window.top.space_addItem(1,7510,0,80,0,0,94)

最美的花 javascript:window.top.space_addItem(1,7513,0,80,0,0,94)

那年的歌 javascript:window.top.space_addItem(1,7619,0,80,0,0,94)

如此的爱 javascript:window.top.space_addItem(1,4693,0,80,0,0,94)

幸福的故事 javascript:window.top.space_addItem(1,4903,0,80,0,0,94)

javascript:window.top.space_addItem(1,12287,0,80,0,0,93)纯黑白点阵

javascript:window.top.space_addItem(1,12561,0,80,0,0,93)纯黑 白色星辰

javascript:window.top.space_addItem(1,12563,0,80,0,0,93)纯黑 珠子吊线

javascript:window.top.space_addItem(1,11400,0,80,0,0,93)纯黑 荷花底纹

javascript:window.top.space_addItem(1,11396,0,80,0,0,93)纯黑 带星星

javascript:window.top.space_addItem(1,16458,0,80,0,0,93)纯黑 白色爱心

javascript:window.top.space_addItem(1,15925,0,80,0,0,93)纯黑 红点

javascript:window.top.space_addItem(1,15915,0,80,0,0,93)纯黑 萤火虫

javascript:window.top.space_addItem(1,15260,0,80,0,0,93)黑色 彩色喷溅

javascript:window.top.space_addItem(1,15001,0,80,0,0,93)黑色 雪花

javascript:window.top.space_addItem(1,13443,0,80,0,0,93)黑色 红色喷溅

javascript:window.top.space_addItem(1,11998,0,80,0,0,90)格子黑色

小屏皮肤右移代码:

javascript:window.top.space_addItem(1,皮肤编号,移动距离,80,0,0,20)

字串9

全粉样式:javascript:window.top.space_addItem(1,4693,0,80,0,0,93)

QQ空间导航代码

横向:粉色可爱 javascript:window.top.space_addItem(13,5503,0,0,600,200,0)

竖着的五星:jjavascript:window.top.space_addItem(13,5145,0,0,200,600,0)

美妙音符:javascript:window.top.space_addItem(13,5330,0,0,200,600,0)

鱼:javascript:window.top.space_addItem(13,5003,0,0,200,600,0)

清甜爽口:javascript:window.top.space_addItem(13,4384,0,0,150,700,0)

流金岁月:javascript:window.top.space_addItem(13,5330,0,0,150,700,0)

摘星:javascript:window.top.space_addItem(13,5145,0,0,150,700,0)

深海奥妙:javascript:window.top.space_addItem(13,5003,0,0,150,700,0)

字串3

竖着的导航:javascript:window.top.space_addItem(13,1,100,80,0,0,94)字串2

心爱花藤:javascript:window.top.space_addItem(13,9114,0,0,200,600,0)

横项的导航:javascript:window.top.space_addItem(13,5503,0,0,600,200,0)

去除横幅代码:

非黄钻去横幅代码:javascript:window.top.space_addItem(19,14692,10,100,100,100,100)

2.1元(非黄钻 收费去横幅代码)

黄钻专用去横幅代码:javascript:window.top.space_addItem(19,15330,0,0,0,0,10000)

小屏皮肤右移代码:

javascript:window.top.space_addItem(1,皮肤编号,移动距离,80,0,0,20)

QQ空间鼠标代码

色狼:javascript:window.top.space_addItem(4,5535,0,0,1,1,0)

蜡笔小新:javascript:window.top.space_addItem(4,5837,0,0,1,1,0)

丑:javascript:window.top.space_addItem(4,4966,0,0,0,1,0)

老鹰 javascript:window.top.space_addItem(4,1151,0,0,0,1,0)

QQ空间欢迎动画代码

流星蝴蝶:javascript:window.top.space_addItem(14,7983,0,0,1,1,0)

欢迎来我家 javascript:window.top.space_addItem(14,4386,0,0,1,1,0)

幽夜幕 javascript:window.top.space_addItem(14,5002,0,0,1,1,0)

与你分享 javascript:window.top.space_addItem(14,4387,0,0,1,1,0)

月光马 javascript:window.top.space_addItem(14,5077,0,0,1,1,0)

分享 javascript:window.top.space_addItem(14,5329,0,0,1,1,0)

冲吧跟斗云 javascript:window.top.space_addItem(14,4333,0,0,1,1,0)

与你分享 javascript:window.top.space_addItem(14,4387,0,0,1,1,0)

世界杯:javascript:window.top.space_addItem(14,5242,0,0,1,1,0)

QQ空间播放器代码

旋律 javascript:window.top.space_addItem(6,1228,0,0,200,200,0)

茶色:javascript:window.top.space_addItem(6,702,0,0,200,200,0)字串4

水晶年代:javascript:window.top.space_addItem(6,703,0,0,200,200,0)

空间漂浮物代码

梦的希望 javascript:window.top.space_addItem(5,609,0,0,1,1,0)

梦的希望 (彩色) javascript:window.top.space_addItem(5,609,0,0,7,1,0)

爱情天使 (单个) javascript:window.top.space_addItem(5,1097,0,0,1,

qq空间说说的代码:{uin:1314,nick: 内容,who:1}。

1.QQ空间(Qzone)是腾讯公司在2005年开发出来的一个具有个性空间,具有博虚者并客(blog)的功能的QQ附属产品,自问世以来受到众多人的喜嫌裤爱。

2.在QQ空间上可以书写日志、写说说,上传用户个人的图片,听音乐,写心情,.通过多种方式展现自己。除此之差迹外,用户还可以根据个人的喜爱设定空间的背景、小挂件等,从而使每个空间都有自己的特色。当然,QQ空间还为精通网页的用户还提供了高级的功能:可以通过编写各种各样的代码来打造个人主页。


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/12406746.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-25
下一篇 2023-05-25

发表评论

登录后才能评论

评论列表(0条)

保存