extends:http://104zz.iteye.com/blog/1709840

本例为模仿微信聊天界面UI设计,文字发送以及语言录制UI。

1先看效果图:


 

 

 

第一:chat.xml设计

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/chat_bg_default" > <!-- 标题栏 -->
<RelativeLayout
android:id="@+id/rl_layout"
android:layout_width="fill_parent"
android:layout_height="45dp"
android:background="@drawable/title_bar"
android:gravity="center_vertical" > <Button
android:id="@+id/btn_back"
android:layout_width="70dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:background="@drawable/title_btn_back"
android:onClick="chat_back"
android:text="返回"
android:textColor="#fff"
android:textSize="14sp" /> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="白富美"
android:textColor="#ffffff"
android:textSize="20sp" /> <ImageButton
android:id="@+id/right_btn"
android:layout_width="67dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="5dp"
android:background="@drawable/title_btn_right"
android:src="@drawable/mm_title_btn_contact_normal" />
</RelativeLayout> <!-- 底部按钮以及 编辑框 -->
<RelativeLayout
android:id="@+id/rl_bottom"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@drawable/chat_footer_bg" > <ImageView
android:id="@+id/ivPopUp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="10dip"
android:src="@drawable/chatting_setmode_msg_btn" /> <RelativeLayout
android:id="@+id/btn_bottom"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/ivPopUp" > <Button
android:id="@+id/btn_send"
android:layout_width="60dp"
android:layout_height="40dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:background="@drawable/chat_send_btn"
android:text="发送" /> <EditText
android:id="@+id/et_sendmessage"
android:layout_width="fill_parent"
android:layout_height="40dp"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_toLeftOf="@id/btn_send"
android:background="@drawable/login_edit_normal"
android:singleLine="true"
android:textSize="18sp" />
</RelativeLayout> <TextView
android:id="@+id/btn_rcd"
android:layout_width="fill_parent"
android:layout_height="40dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_toRightOf="@+id/ivPopUp"
android:background="@drawable/chat_send_btn"
android:gravity="center"
android:text="按住说话"
android:visibility="gone" />
</RelativeLayout> <!-- 聊天内容 listview -->
<ListView
android:id="@+id/listview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@id/rl_bottom"
android:layout_below="@id/rl_layout"
android:cacheColorHint="#0000"
android:divider="@null"
android:dividerHeight="5dp"
android:scrollbarStyle="outsideOverlay"
android:stackFromBottom="true" /> <!-- 录音显示UI层 -->
<LinearLayout
android:id="@+id/rcChat_popup"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:visibility="gone" > <include
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
layout="@layout/voice_rcd_hint_window" />
</LinearLayout> </RelativeLayout>

第二:语音录制类封装SoundMeter.java

package com.example.voice_rcd;  

import java.io.IOException;  

import android.media.MediaRecorder;
import android.os.Environment; public class SoundMeter {
static final private double EMA_FILTER = 0.6; private MediaRecorder mRecorder = null;
private double mEMA = 0.0; public void start(String name) {
if (!Environment.getExternalStorageState().equals(
android.os.Environment.MEDIA_MOUNTED)) {
return;
}
if (mRecorder == null) {
mRecorder = new MediaRecorder();
mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
mRecorder.setOutputFile(android.os.Environment.getExternalStorageDirectory()+"/"+name);
try {
mRecorder.prepare();
mRecorder.start(); mEMA = 0.0;
} catch (IllegalStateException e) {
System.out.print(e.getMessage());
} catch (IOException e) {
System.out.print(e.getMessage());
} }
} public void stop() {
if (mRecorder != null) {
mRecorder.stop();
mRecorder.release();
mRecorder = null;
}
} public void pause() {
if (mRecorder != null) {
mRecorder.stop();
}
} public void start() {
if (mRecorder != null) {
mRecorder.start();
}
} public double getAmplitude() {
if (mRecorder != null)
return (mRecorder.getMaxAmplitude() / 2700.0);
else
return 0; } public double getAmplitudeEMA() {
double amp = getAmplitude();
mEMA = EMA_FILTER * amp + (1.0 - EMA_FILTER) * mEMA;
return mEMA;
}
}
 

第三:主界面Activity源码,没写太多解释,相对比较简单的自己研究下:

package com.example.voice_rcd;  

import java.io.File;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List; import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.os.SystemClock;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnTouchListener;
import android.view.WindowManager;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast; public class MainActivity extends Activity implements OnClickListener {
/** Called when the activity is first created. */ private Button mBtnSend;
private TextView mBtnRcd;
private Button mBtnBack;
private EditText mEditTextContent;
private RelativeLayout mBottom;
private ListView mListView;
private ChatMsgViewAdapter mAdapter;
private List<ChatMsgEntity> mDataArrays = new ArrayList<ChatMsgEntity>();
private boolean isShosrt = false;
private LinearLayout voice_rcd_hint_loading, voice_rcd_hint_rcding,
voice_rcd_hint_tooshort;
private ImageView img1, sc_img1;
private SoundMeter mSensor;
private View rcChat_popup;
private LinearLayout del_re;
private ImageView chatting_mode_btn, volume;
private boolean btn_vocie = false;
private int flag = 1;
private Handler mHandler = new Handler();
private String voiceName;
private long startVoiceT, endVoiceT; public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.chat);
// 启动activity时不自动弹出软键盘
getWindow().setSoftInputMode(
WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
initView(); initData();
} public void initView() {
mListView = (ListView) findViewById(R.id.listview);
mBtnSend = (Button) findViewById(R.id.btn_send);
mBtnRcd = (TextView) findViewById(R.id.btn_rcd);
mBtnSend.setOnClickListener(this);
mBtnBack = (Button) findViewById(R.id.btn_back);
mBottom = (RelativeLayout) findViewById(R.id.btn_bottom);
mBtnBack.setOnClickListener(this);
chatting_mode_btn = (ImageView) this.findViewById(R.id.ivPopUp);
volume = (ImageView) this.findViewById(R.id.volume);
rcChat_popup = this.findViewById(R.id.rcChat_popup);
img1 = (ImageView) this.findViewById(R.id.img1);
sc_img1 = (ImageView) this.findViewById(R.id.sc_img1);
del_re = (LinearLayout) this.findViewById(R.id.del_re);
voice_rcd_hint_rcding = (LinearLayout) this
.findViewById(R.id.voice_rcd_hint_rcding);
voice_rcd_hint_loading = (LinearLayout) this
.findViewById(R.id.voice_rcd_hint_loading);
voice_rcd_hint_tooshort = (LinearLayout) this
.findViewById(R.id.voice_rcd_hint_tooshort);
mSensor = new SoundMeter();
mEditTextContent = (EditText) findViewById(R.id.et_sendmessage); //语音文字切换按钮
chatting_mode_btn.setOnClickListener(new OnClickListener() { public void onClick(View v) { if (btn_vocie) {
mBtnRcd.setVisibility(View.GONE);
mBottom.setVisibility(View.VISIBLE);
btn_vocie = false;
chatting_mode_btn
.setImageResource(R.drawable.chatting_setmode_msg_btn); } else {
mBtnRcd.setVisibility(View.VISIBLE);
mBottom.setVisibility(View.GONE);
chatting_mode_btn
.setImageResource(R.drawable.chatting_setmode_voice_btn);
btn_vocie = true;
}
}
});
mBtnRcd.setOnTouchListener(new OnTouchListener() { public boolean onTouch(View v, MotionEvent event) {
//按下语音录制按钮时返回false执行父类OnTouch
return false;
}
});
} private String[] msgArray = new String[] { "有人就有恩怨","有恩怨就有江湖","人就是江湖","你怎么退出? ","生命中充满了巧合","两条平行线也会有相交的一天。"}; private String[] dataArray = new String[] { "2012-10-31 18:00",
"2012-10-31 18:10", "2012-10-31 18:11", "2012-10-31 18:20",
"2012-10-31 18:30", "2012-10-31 18:35"};
private final static int COUNT = 6; public void initData() {
for (int i = 0; i < COUNT; i++) {
ChatMsgEntity entity = new ChatMsgEntity();
entity.setDate(dataArray[i]);
if (i % 2 == 0) {
entity.setName("白富美");
entity.setMsgType(true);
} else {
entity.setName("高富帅");
entity.setMsgType(false);
} entity.setText(msgArray[i]);
mDataArrays.add(entity);
} mAdapter = new ChatMsgViewAdapter(this, mDataArrays);
mListView.setAdapter(mAdapter); } public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()) {
case R.id.btn_send:
send();
break;
case R.id.btn_back:
finish();
break;
}
} private void send() {
String contString = mEditTextContent.getText().toString();
if (contString.length() > 0) {
ChatMsgEntity entity = new ChatMsgEntity();
entity.setDate(getDate());
entity.setName("高富帅");
entity.setMsgType(false);
entity.setText(contString); mDataArrays.add(entity);
mAdapter.notifyDataSetChanged(); mEditTextContent.setText(""); mListView.setSelection(mListView.getCount() - 1);
}
} private String getDate() {
Calendar c = Calendar.getInstance(); String year = String.valueOf(c.get(Calendar.YEAR));
String month = String.valueOf(c.get(Calendar.MONTH));
String day = String.valueOf(c.get(Calendar.DAY_OF_MONTH) + 1);
String hour = String.valueOf(c.get(Calendar.HOUR_OF_DAY));
String mins = String.valueOf(c.get(Calendar.MINUTE)); StringBuffer sbBuffer = new StringBuffer();
sbBuffer.append(year + "-" + month + "-" + day + " " + hour + ":"
+ mins); return sbBuffer.toString();
} //按下语音录制按钮时
@Override
public boolean onTouchEvent(MotionEvent event) { if (!Environment.getExternalStorageDirectory().exists()) {
Toast.makeText(this, "No SDCard", Toast.LENGTH_LONG).show();
return false;
} if (btn_vocie) {
System.out.println("1");
int[] location = new int[2];
mBtnRcd.getLocationInWindow(location); // 获取在当前窗口内的绝对坐标
int btn_rc_Y = location[1];
int btn_rc_X = location[0];
int[] del_location = new int[2];
del_re.getLocationInWindow(del_location);
int del_Y = del_location[1];
int del_x = del_location[0];
if (event.getAction() == MotionEvent.ACTION_DOWN && flag == 1) {
if (!Environment.getExternalStorageDirectory().exists()) {
Toast.makeText(this, "No SDCard", Toast.LENGTH_LONG).show();
return false;
}
System.out.println("2");
if (event.getY() > btn_rc_Y && event.getX() > btn_rc_X) {//判断手势按下的位置是否是语音录制按钮的范围内
System.out.println("3");
mBtnRcd.setBackgroundResource(R.drawable.voice_rcd_btn_pressed);
rcChat_popup.setVisibility(View.VISIBLE);
voice_rcd_hint_loading.setVisibility(View.VISIBLE);
voice_rcd_hint_rcding.setVisibility(View.GONE);
voice_rcd_hint_tooshort.setVisibility(View.GONE);
mHandler.postDelayed(new Runnable() {
public void run() {
if (!isShosrt) {
voice_rcd_hint_loading.setVisibility(View.GONE);
voice_rcd_hint_rcding
.setVisibility(View.VISIBLE);
}
}
}, 300);
img1.setVisibility(View.VISIBLE);
del_re.setVisibility(View.GONE);
startVoiceT = SystemClock.currentThreadTimeMillis();
voiceName = startVoiceT + ".amr";
start(voiceName);
flag = 2;
}
} else if (event.getAction() == MotionEvent.ACTION_UP && flag == 2) {//松开手势时执行录制完成
System.out.println("4");
mBtnRcd.setBackgroundResource(R.drawable.voice_rcd_btn_nor);
if (event.getY() >= del_Y
&& event.getY() <= del_Y + del_re.getHeight()
&& event.getX() >= del_x
&& event.getX() <= del_x + del_re.getWidth()) {
rcChat_popup.setVisibility(View.GONE);
img1.setVisibility(View.VISIBLE);
del_re.setVisibility(View.GONE);
stop();
flag = 1;
File file = new File(android.os.Environment.getExternalStorageDirectory()+"/"
+ voiceName);
if (file.exists()) {
file.delete();
}
} else { voice_rcd_hint_rcding.setVisibility(View.GONE);
stop();
endVoiceT = SystemClock.currentThreadTimeMillis();
flag = 1;
int time = (int) ((endVoiceT - startVoiceT) / 1000);
if (time < 1) {
isShosrt = true;
voice_rcd_hint_loading.setVisibility(View.GONE);
voice_rcd_hint_rcding.setVisibility(View.GONE);
voice_rcd_hint_tooshort.setVisibility(View.VISIBLE);
mHandler.postDelayed(new Runnable() {
public void run() {
voice_rcd_hint_tooshort
.setVisibility(View.GONE);
rcChat_popup.setVisibility(View.GONE);
isShosrt = false;
}
}, 500);
return false;
}
ChatMsgEntity entity = new ChatMsgEntity();
entity.setDate(getDate());
entity.setName("高富帅");
entity.setMsgType(false);
entity.setTime(time+"\"");
entity.setText(voiceName);
mDataArrays.add(entity);
mAdapter.notifyDataSetChanged();
mListView.setSelection(mListView.getCount() - 1);
rcChat_popup.setVisibility(View.GONE); }
}
if (event.getY() < btn_rc_Y) {//手势按下的位置不在语音录制按钮的范围内
System.out.println("5");
Animation mLitteAnimation = AnimationUtils.loadAnimation(this,
R.anim.cancel_rc);
Animation mBigAnimation = AnimationUtils.loadAnimation(this,
R.anim.cancel_rc2);
img1.setVisibility(View.GONE);
del_re.setVisibility(View.VISIBLE);
del_re.setBackgroundResource(R.drawable.voice_rcd_cancel_bg);
if (event.getY() >= del_Y
&& event.getY() <= del_Y + del_re.getHeight()
&& event.getX() >= del_x
&& event.getX() <= del_x + del_re.getWidth()) {
del_re.setBackgroundResource(R.drawable.voice_rcd_cancel_bg_focused);
sc_img1.startAnimation(mLitteAnimation);
sc_img1.startAnimation(mBigAnimation);
}
} else { img1.setVisibility(View.VISIBLE);
del_re.setVisibility(View.GONE);
del_re.setBackgroundResource(0);
}
}
return super.onTouchEvent(event);
} private static final int POLL_INTERVAL = 300; private Runnable mSleepTask = new Runnable() {
public void run() {
stop();
}
};
private Runnable mPollTask = new Runnable() {
public void run() {
double amp = mSensor.getAmplitude();
updateDisplay(amp);
mHandler.postDelayed(mPollTask, POLL_INTERVAL); }
}; private void start(String name) {
mSensor.start(name);
mHandler.postDelayed(mPollTask, POLL_INTERVAL);
} private void stop() {
mHandler.removeCallbacks(mSleepTask);
mHandler.removeCallbacks(mPollTask);
mSensor.stop();
volume.setImageResource(R.drawable.amp1);
} private void updateDisplay(double signalEMA) { switch ((int) signalEMA) {
case 0:
case 1:
volume.setImageResource(R.drawable.amp1);
break;
case 2:
case 3:
volume.setImageResource(R.drawable.amp2); break;
case 4:
case 5:
volume.setImageResource(R.drawable.amp3);
break;
case 6:
case 7:
volume.setImageResource(R.drawable.amp4);
break;
case 8:
case 9:
volume.setImageResource(R.drawable.amp5);
break;
case 10:
case 11:
volume.setImageResource(R.drawable.amp6);
break;
default:
volume.setImageResource(R.drawable.amp7);
break;
}
} public void head_xiaohei(View v) { // 标题栏 返回按钮 }
}
 

第四:自定义的显示适配器:

package com.example.voice_rcd;  

import java.util.List;  

import android.content.Context;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnCompletionListener;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView; public class ChatMsgViewAdapter extends BaseAdapter { public static interface IMsgViewType {
int IMVT_COM_MSG = 0;
int IMVT_TO_MSG = 1;
} private static final String TAG = ChatMsgViewAdapter.class.getSimpleName(); private List<ChatMsgEntity> coll; private Context ctx; private LayoutInflater mInflater;
private MediaPlayer mMediaPlayer = new MediaPlayer(); public ChatMsgViewAdapter(Context context, List<ChatMsgEntity> coll) {
ctx = context;
this.coll = coll;
mInflater = LayoutInflater.from(context);
} public int getCount() {
return coll.size();
} public Object getItem(int position) {
return coll.get(position);
} public long getItemId(int position) {
return position;
} public int getItemViewType(int position) {
// TODO Auto-generated method stub
ChatMsgEntity entity = coll.get(position); if (entity.getMsgType()) {
return IMsgViewType.IMVT_COM_MSG;
} else {
return IMsgViewType.IMVT_TO_MSG;
} } public int getViewTypeCount() {
// TODO Auto-generated method stub
return 2;
} public View getView(int position, View convertView, ViewGroup parent) { final ChatMsgEntity entity = coll.get(position);
boolean isComMsg = entity.getMsgType(); ViewHolder viewHolder = null;
if (convertView == null) {
if (isComMsg) {
convertView = mInflater.inflate(
R.layout.chatting_item_msg_text_left, null);
} else {
convertView = mInflater.inflate(
R.layout.chatting_item_msg_text_right, null);
} viewHolder = new ViewHolder();
viewHolder.tvSendTime = (TextView) convertView
.findViewById(R.id.tv_sendtime);
viewHolder.tvUserName = (TextView) convertView
.findViewById(R.id.tv_username);
viewHolder.tvContent = (TextView) convertView
.findViewById(R.id.tv_chatcontent);
viewHolder.tvTime = (TextView) convertView
.findViewById(R.id.tv_time);
viewHolder.isComMsg = isComMsg; convertView.setTag(viewHolder);
} else {
viewHolder = (ViewHolder) convertView.getTag();
} viewHolder.tvSendTime.setText(entity.getDate()); if (entity.getText().contains(".amr")) {
viewHolder.tvContent.setText("");
viewHolder.tvContent.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.chatto_voice_playing, 0);
viewHolder.tvTime.setText(entity.getTime());
} else {
viewHolder.tvContent.setText(entity.getText());
viewHolder.tvContent.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
viewHolder.tvTime.setText("");
}
viewHolder.tvContent.setOnClickListener(new OnClickListener() { public void onClick(View v) {
if (entity.getText().contains(".amr")) {
playMusic(android.os.Environment.getExternalStorageDirectory()+"/"+entity.getText()) ;
}
}
});
viewHolder.tvUserName.setText(entity.getName()); return convertView;
} static class ViewHolder {
public TextView tvSendTime;
public TextView tvUserName;
public TextView tvContent;
public TextView tvTime;
public boolean isComMsg = true;
} /**
* @Description
* @param name
*/
private void playMusic(String name) {
try {
if (mMediaPlayer.isPlaying()) {
mMediaPlayer.stop();
}
mMediaPlayer.reset();
mMediaPlayer.setDataSource(name);
mMediaPlayer.prepare();
mMediaPlayer.start();
mMediaPlayer.setOnCompletionListener(new OnCompletionListener() {
public void onCompletion(MediaPlayer mp) { }
}); } catch (Exception e) {
e.printStackTrace();
} } private void stop() { } }
 

附上代码,希望有需要的可以下载研究完善。

android 仿微信聊天界面,以及语音录制功能的更多相关文章

  1. HTML5仿微信聊天界面、微信朋友圈实例

    这几天使用H5开发了一个仿微信聊天前端界面,尤其微信底部编辑器那块处理的很好,使用HTML5来开发,虽说功能效果并没有微信那么全,但是也相当不错了,可以发送消息.表情,发送的消息自动回滚定位到底部,另 ...

  2. web版仿微信聊天界面|h5仿微信电脑端案例开发

    前几天开发了一款手机端h5仿微信聊天,人唯有不停学习才能进步,这段时间倒腾着整理了下之前项目,又重新在原先的那版基础上开发了一款仿微信聊天电脑端web版本,聊天页面又重新优化了多图预览.视频播放,右键 ...

  3. vue聊天室|h5+vue仿微信聊天界面|vue仿微信

    一.项目简介 基于Vue2.0+Vuex+vue-router+webpack2.0+es6+vuePhotoPreview+wcPop等技术架构开发的仿微信界面聊天室——vueChatRoom,实现 ...

  4. Android仿微信朋友圈,全文收起功能,附源码

    在众多的社交类软件中,朋友圈是必不可少的,可以与好友.同学等分享自己的日常和有意思的事情,在开发社交类App时,朋友圈发表的内容你不可能让他全部显示,全部显示的话用户体验度会非常不好,这时就要用到全文 ...

  5. uni-app聊天室|vue+uniapp仿微信聊天实例|uniapp仿微信App界面

    一.介绍 运用UniApp+Vue+Vuex+swiper+uniPop等技术开发的仿微信原生App聊天室|仿微信聊天界面实例项目uniapp-chatroom,实现了发送图文消息.表情(gif图), ...

  6. CSS3 仿微信聊天小气泡

    今天给大家分享一个我刚做的项目中的一个小案例, 因为我们在做一个聊天的功能,之前的聊天页面UI很丑,我就不在这里展示给大家了. 现在就教大家怎么用css3制作一个和微信聊天界面一样的页面. 首先给大家 ...

  7. uniapp+nvue实现仿微信App界面+功能 —— uni-app实现聊天+语音+视频+图片消息

    基于uniapp + nvue实现的uniapp仿微信界面功能聊天应用 txim 实例项目,实现了以下功能. 1: 聊天会话管理 2: 好友列表 3: 文字.语音.视频.表情.位置等聊天消息收发 4: ...

  8. Android ActionBar应用实战,高仿微信主界面的设计

    转载请注明出处:http://blog.csdn.net/guolin_blog/article/details/26365683 经过前面两篇文章的学习,我想大家对ActionBar都已经有一个相对 ...

  9. [Android] Android 手机下 仿 微信 客户端 界面 -- 微聊

    Android 手机下 仿 微信 客户端 界面 -- 微聊 (包括聊天列表 + 聊天对话页 + 朋友圈列表页 + 我的/发现 列表页) 项目演示: 功能说明: 1)底部标签切换 (TabHost + ...

随机推荐

  1. 06 Locking and Latching

    本章提要---------------------------------------------------------------6,7,8,9,10,11 这 6 章要细看, 从本章开始how ...

  2. 看了这个才发现jQuery源代码不是那么晦涩

    很多人觉得jquery.ext等一些开源js源代码 十分的晦涩,读不懂,遇到问题需要调试也很费劲.其实我个人感觉主要是有几个方面的原因: 1.对一些js不常用的语法.操作符不熟悉 2.某个functi ...

  3. 《FPGA全程进阶---实战演练》第三章之PCB叠层

    1.双面板 在双层板设计layout时,最好不要不成梳状结构,因为这样构成的电路,回路面积较大,但是只要对较重要的信号加以地保护,布线完成之后将空的地方敷上地铜皮,并在多个过孔将两个地连接起来,可以弥 ...

  4. 关于Cocos2d-x中地图轮播的实现

    播放背景,两个背景的图片是一样的,紧挨着循环播放,以下代码写在playBackground()方法中,并在GameScene.cpp的init方法中调用. void GameScene::playBa ...

  5. php将汉字转换为拼音和得到词语首字母(三)

    <?php function getfirstchar($s0){ $fchar = ord($s0{0}); if($fchar >= ord("A") and $f ...

  6. c++ 向main传递参赛

    1.今天写了个批处理文件 准备向main传递参赛  发现在vs2008运行正常 vs2010运行只有首字母 2.需要在项目--属性--常规-字符集里面设置成多字节就好了,以前是unicode 3.因为 ...

  7. oracle查询一个用户下的所有表

    select table_name from all_tables where owner_name=upper('scott'); 用户名一定要大写//

  8. 创建并调用 DLL(1)

    //通过 DLL Wizard 建立: library TestDLL; uses   SysUtils,   Classes,   Dialogs; {$R *.res} //建立过程 proced ...

  9. 删除C盘垃圾文件bat

    @ECHO OFF@echo 此批处理由59互联(http://www.59.cn)整理发布@echo @echo 清理几个比较多垃圾文件的地方DEL /F /S /Q "C:\WINDOW ...

  10. SQL中查询语句的使用

    常用SQL查询语句 - myLittleGarden - 博客园 http://www.cnblogs.com/sunada2005/p/3411873.html 一.简单查询语句 1. 查看表结构 ...