待解决问题:

*1:内部ScrollView与外部手势事件滑动冲突问题。

*2:Linearlayout+View+LinearLayout横向排列,这其中两个LinearLayout内部各有3个竖向排列的TextView,这3个TextView的居中问题。

今天解决的问题:

1.

//

private static Handler handler = new Handler() {
public void handleMessage(android.os.Message msg) {

for (int i = 0; i < eList.getExaminationCount(); i++) {
Question question = new Question();
question.setAnswer(eList.getExamination(i).getTrueanswer());
... ...
question.setExplain(eList.getExamination(i).getExplain());
QuestionList.add(question);
}

};
};

//

public class ExamListRecv extends BroadcastReceiver {

@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals("EXAMLIST")) {
handler.sendEmptyMessage(0);
}
}
}

激活BroadcastReceiver 为新的进程(包括线程),所以会向UI线程发送消息,更新UI。

2.同事的写法。Toast.makeText(getApplicationContext(), "已经连接", 200).show();

3.还没从数据库加载完成就执行自定义的init()操作导致出现InvocationTargetException异常和数组越界。

4.将工程从Eclipse转移到Android Studio上时,出现Execution failed for task 'app:mergeDebugResources' Crunching Cruncher…png failed错误,主要是图片问题,格式不对,把原来的图片用画图工具打开,然后重新另存为就好了。若出现Error:Execution failed for task ':ProjectName:mergeDebugResources'. > Crunching Cruncher *some file* failed, see logs。重启一下Android Studio就好了。重新运行,会提示签名不一样,会把原来的程序卸载掉,终于又回到了Android Studio这么爽的平台,加油。

可以再参考:在你的主工程文件夹里的build.gradle文件里,加上下面这两句:
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false

参考:https://segmentfault.com/q/1010000002634455

5.protobuf工具学习使用。

6.在我们运用Android 官方新的Gradle构建方式build后的存在于app/build/apk文件夹下会发现有app-debug-unaligned.apk,那么这个apk是什么作用呢?

实际上分为两个过程,这个unaligend仅仅是个中间产物(intermediate product). 
1.生成unaligned APK. 
2.unaligned APK变为aligned,并且产生aligned APK.

参考:http://www.gimoo.net/t/1502/54ed73019d10b.html

解决的问题2:

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerHorizontal="true"
android:layout_marginLeft="10dp"
android:gravity="center"
android:orientation="vertical"> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="题友出错率"
android:textColor="@color/exam_small_size"
android:textSize="@dimen/exam_detail_tiyou_font_size" /> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="5.9%"
android:textColor="#FF0000"
android:textSize="40sp" /> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="据统计5.9%的人做错过"
android:textColor="@color/exam_small_size"
android:textSize="@dimen/exam_detail_tiyou_font_size" /> </LinearLayout> <View
android:layout_width="1px"
android:layout_height="70dp"
android:layout_centerHorizontal="true"
android:background="#C4C4C4" /> <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerHorizontal="true"
android:layout_marginRight="10dp"
android:gravity="center"
android:orientation="vertical"> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="我的出错率"
android:textColor="@color/exam_small_size"
android:textSize="@dimen/exam_detail_tiyou_font_size" /> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="100.0%"
android:textColor="#FF0000"
android:textSize="40sp" /> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="我做错1次,做对0次"
android:textColor="@color/exam_small_size"
android:textSize="@dimen/exam_detail_tiyou_font_size" />
</LinearLayout>

2016年3月10日Android实习日记的更多相关文章

  1. 2016年3月15日Android实习日记

    1.解决了ScrollView滑动冲突问题. 2.设置好了“查看详解”与“题目编号”的部分. 3.完成了app启动图片的设置,并在启动的过程中开辟新的线程连接服务器并开启监听数据. 别忘了注册启动Ac ...

  2. 2016年3月9日Android实习日记

    1. 解决 org.eclipse.swt.SWTException: Graphic is disposed 问题. 参考:http://www.xuebuyuan.com/1896964.html ...

  3. 2016年3月11日Android实习日记

    1.明天删除orthodotics_design_animation_content_gif.gif文件.(已完成) 2. 如何检测内存泄露? A: 可以通过一些性能监测分析工具,如 JProfile ...

  4. 2016年3月8日Android实习日记

    1.出现fragment后台栈的bug. bug描述:当点击加入后台栈的操作按钮改变指定控件的内容之后,称为A操作:接下来又点击其它没有操作后台栈的按钮来修改原来指定的控件内容,称为B操作.然后点击b ...

  5. 2016年3月4日Android实习笔记

    1.让水平LinearLayout中的两个子元素分别居左和居右 在LinearLayout中有两个子元素,LinearLayout的orientation是horizontal.需要让第一个元素居左, ...

  6. 2016年3月3日android实习笔记

    1: android自定义控件时,通常需要重写父类构造函数.这三个够找函数具体啥时调用? public View (Context context) 是在java代码创建视图的时候被调用,如果是从xm ...

  7. 2016年3月1日Android实习笔记

    1:经查资料,Android中gif动画加载共有两种 1)利用WebView,WebView 主要调用三个方法:LoadUrl.LoadData.LoadDataWithBaseURL 2)主要用的是 ...

  8. 2016年3月11日Android学习日记

    1.调试技巧:当一次调试过后,可以在App重新返回当前的状态,然后再调试,而不用再点击Android studio的Debug按钮. 参考:http://www.2cto.com/kf/201506/ ...

  9. 2016年12月10日 星期六 --出埃及记 Exodus 21:5

    2016年12月10日 星期六 --出埃及记 Exodus 21:5 "But if the servant declares, `I love my master and my wife ...

随机推荐

  1. Linux内核驱动--mmap设备方法【原创】

    mmap系统调用(功能) void *mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset) 内存映射函数mma ...

  2. select 不要 用*

    背景 说实在的,这有什么好记录的呢.记录这个有啥用,真是技术人员的吹毛求疵.说起来,就是给人装有用吧.既然记录了,也想个相关的段子吧.曾经有个同事写了个sql,效率极差,来了个女同事,竟然解决了,问题 ...

  3. 006_nginx动态upstream和安全检查模块

    一.参考Tengine   http://tengine.taobao.org/document_cn/http_dyups_cn.html ngx_http_dyups_module Descrip ...

  4. nagios系列(八)之nagios通过nsclient监控windows主机

    nagios通过nsclient监控windows主机 1.下载NSClient -0.3.8-Win32.rar安装在需要被监控的windows主机中 可以设置密码,此处密码留空 2.通过在nagi ...

  5. 转:MySQL如何修改密码

    转:https://www.cnblogs.com/yang82/p/7794712.html. 第一种方式: 最简单的方法就是借助第三方工具Navicat for MySQL来修改,方法如下: 1. ...

  6. vue系列之flex经典案例

    案例分析: 1.中间文字居中 2.文字俩边有横线 横线无法固定宽度,因为在大屏手机上,容易出现Bug,宽度不够,俩边会出现大量空隙 解决办法,使用flex布局(网站链接) 代码: <div cl ...

  7. exe4j中"this executable was created with an evaluation version exe4j"的解决

    在使用exe4j时,如果您的exe4j没有注册,在运行有exe4j转换的*.jar为*.exe的可执行文件时,会提示:"this executable was created with an ...

  8. 【ES】学习2-搜索

    1.空搜索 返回所有索引下的所有文档 GET /_search 设置超时.timeout 不是停止执行查询,它仅仅是告知正在协调的节点返回到目前为止收集的结果并且关闭连接.在后台,其他的分片可能仍在执 ...

  9. window 连linux

    https://blog.csdn.net/ruanjianruanjianruan/article/details/46954681 https://blog.csdn.net/u013754317 ...

  10. MFC单文档

    一.创建并运行MFC单文档程序 1.创建单文档程序 这里使用的是VS2017.首先,打开VS2017,选择文件->新建->项目,然后选择Visual C++ -> MFC /ATL& ...