客户端发送消息时候 可以发送文件或语音或普通文字消息 本人是通过base64转码成字符串发送。
但是在接受端怎么样判断本人发送的是文件 语音 或是 文字
在监听器中有 Message msg 打印出来是一个xml格式的信息。怎么样在发送的时候 在xml中添加一个类型子节点
<message id=”23Uiq-10″ t……继续阅读 »
10年前 (2015-11-12) 1369浏览
0个赞
定义4个按钮,点击事件Fragment 切换。
但是由于需要请求网络数据,每次切换都要重新刷新数据。
请教!
解决方案:25分
public void switchContent(Fragment from, Fragment to) {
if (mContent != to) {
mContent = to;……继续阅读 »
10年前 (2015-11-12) 2131浏览
0个赞
如图片所示,这个EditText的hint提示是在中间,但假如点击,则文字输入的焦点在输入框的最左边开始,
问一下这个是怎么样实现?最好给代码提示,谢谢了。
解决方案:60分
那输入的内容是靠左侧的吗?默认居中对齐,当获取焦点时左对齐,输入框有内容时左对齐。示例代码
cityEditText.setOnFocusChangeListener(new V……继续阅读 »
10年前 (2015-11-12) 1715浏览
0个赞
本人用java连接ftp下载文件,但是连接时就报错了,具体行数是ftp.connect(“192.168.1.174”,22);
端口号是22时,异常为
org.apache.commons.net.MalformedServerReplyException:Could not parse response code.
Server……继续阅读 »
10年前 (2015-11-12) 1436浏览
0个赞
项目的持久层用的hibernate,给项目做框架的用的是封装的一套方法
一个更新的流程
BaseDao:
public <T> void update(T obj);
BaseDaolmpl:
private SessionFactory sessionFactory;
public <T> ……继续阅读 »
10年前 (2015-11-12) 1421浏览
0个赞
本人有个javabean Task
private String uuid;
private Date startDate;
//get set省略
前端代码
<form>
<input type=""text"" name=""uuid""/>
<input type=""text"" name=""startDate""……继续阅读 »
10年前 (2015-11-12) 1034浏览
0个赞
public class ShowAllAction extends ActionSupport{
public String execute() throws Exception{
ProductService ps = ServiceFactory.getServiceInstance();
List<Product&g……继续阅读 »
10年前 (2015-11-12) 1398浏览
0个赞
SharedPreferences share = getSharedPreferences("name", 0);
Editor e = share.edit();
//方法a,在第一句输出的时候读不到数据。
String a = "abc_cc";
System.err.println(share.getString(a, "默……继续阅读 »
10年前 (2015-11-12) 1972浏览
0个赞
class ButtonDemo2 extends JFrame//输出结果窗口
{
public static final int WIDTH=1000;
public static final int HEIGHT=680;
public String rlt=””;
JFrame overGU……继续阅读 »
10年前 (2015-11-12) 4465浏览
0个赞