- 博客(32)
- 收藏
- 关注
原创 Android编程入门-第80天
QueryPreferences.javaimport android.content.Context;import android.preference.PreferenceManager;public class QueryPreferences { private static final String PREF_SEARCH_QUERY = "searchQuery"; ...
2018-05-30 17:32:49 126
原创 Android编程入门-第79天
PollService.javaimport android.app.Activity;import android.app.AlarmManager;import android.app.IntentService;import android.app.Notification;import android.app.PendingIntent;import android.conten...
2018-05-30 17:32:00 149
原创 Android编程入门-第78天
PhotoPageFragment.javaimport android.net.Uri;import android.os.Bundle;import android.support.v7.app.AppCompatActivity;import android.view.LayoutInflater;import android.view.View;import android.vi...
2018-05-30 17:31:18 179
原创 有关Android中使用SQLite的研究
首先要明白SQLite是什么?我们为什么要在Android工程中应用它?SQLite是一款轻量级的数据库,它具有如下特性(摘自百度百科):1. ACID事务2. 零配置 – 无需安装和管理配置3.存储在单一磁盘文件中的一个完整的数据库4.数据库文件可以在不同字节顺序的机器间自由的共享5.支持数据库大小至2TB6. 足够小, 大致13万行C代码, 4.43M7. 比一些流行的数据库在大部分普通数据库...
2018-05-30 17:29:52 265
原创 Android编程入门-第77天
PhotoPageActivity.javaimport android.content.Context;import android.content.Intent;import android.net.Uri;import android.support.v4.app.Fragment;public class PhotoPageActivity extends SingleFragm...
2018-05-29 20:21:54 137
原创 Android编程入门-第76天
PhotoGalleryFragment.javaimport android.content.Intent;import android.graphics.Bitmap;import android.graphics.drawable.BitmapDrawable;import android.graphics.drawable.Drawable;import android.net.U...
2018-05-29 20:20:48 120
原创 Android编程入门-第75天
PhotoGalleryActivity.javaimport android.content.Context;import android.content.Intent;import android.support.v4.app.Fragment;public class PhotoGalleryActivity extends SingleFragmentActivity { ...
2018-05-29 20:19:51 117
原创 Android编程入门-第74天
GalleryItem.javaimport android.net.Uri;public class GalleryItem { private String mCaption; private String mId; private String mUrl; private String mOwner; public String getCapti...
2018-05-29 20:18:35 139
原创 Android编程入门-第73天
在WebView部分对前面的代码进行整理,调整后的所有代码如下:FlickrFetchr.javaimport android.net.Uri;import android.util.Log;import org.json.JSONArray;import org.json.JSONException;import org.json.JSONObject;import java.io...
2018-05-29 20:17:39 162
原创 Android编程入门-第72天
StartupReceiver.javaimport android.content.BroadcastReceiver;import android.content.Context;import android.content.Intent;import android.util.Log;public class StartupReceiver extends BroadcastRec...
2018-05-23 22:59:40 105
原创 Android编程入门-第71天
BroadcastIntents相关实现:NotificationReciever.javaimport android.app.Activity;import android.app.Notification;import android.content.BroadcastReceiver;import android.content.Context;import android.con...
2018-05-23 22:58:34 101
原创 Android编程入门-第70天
IntentServices有关内容:PollService.javaimport android.app.AlarmManager;import android.app.IntentService;import android.app.Notification;import android.app.PendingIntent;import android.content.Context;...
2018-05-20 18:41:19 175 1
原创 Android编程入门-第69天
今天学习Search有关内容QueryPreferences.javaimport android.content.Context;import android.preference.PreferenceManager;public class QueryPreferences { private static final String PREF_SEARCH_QUERY = "s...
2018-05-20 18:39:45 92
原创 Android编程入门-第68天
对PhotoGalleryFragment.java进行部分修改:import android.graphics.Bitmap;import android.graphics.drawable.BitmapDrawable;import android.graphics.drawable.Drawable;import android.os.AsyncTask;import android...
2018-05-16 21:33:08 126
原创 Android编程入门-第67天
今天学习Handlers有关内容ThumbnailDownloader.javaimport android.graphics.Bitmap;import android.graphics.BitmapFactory;import android.os.Handler;import android.os.HandlerThread;import android.os.Message;im...
2018-05-16 21:31:56 139
原创 Android编程入门-第66天
activity_fragment.xml<FrameLayout android:id="@+id/fragment_container" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" ...
2018-05-14 22:48:26 111
原创 Android编程入门-第65天
PhotoGalleryActivity.javaimport android.support.v4.app.Fragment;public class PhotoGalleryActivity extends SingleFragmentActivity { @Override protected Fragment createFragment() { re...
2018-05-13 22:03:04 101
原创 Android编程入门-第64天
PhotoGalleryFragment.javaimport android.os.AsyncTask;import android.os.Bundle;import android.support.v4.app.Fragment;import android.support.v7.widget.GridLayoutManager;import android.support.v7.wi...
2018-05-11 22:02:21 124
原创 Android编程入门-第63天
GalleryItem.javapublic class GalleryItem { private String mCaption; private String mId; private String mUrl; public String getCaption() { return mCaption; } public vo...
2018-05-11 22:01:16 105
原创 Android编程入门-第62天
今天开始学习HTTPBackgroundTasksFlickrFetchr.javaimport android.net.Uri;import android.util.Log;import org.json.JSONArray;import org.json.JSONException;import org.json.JSONObject;import java.io.ByteAr...
2018-05-09 22:19:34 165
原创 Android编程入门-第61天
activity_fragment.xml<FrameLayout android:id="@+id/fragment_container" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" ...
2018-05-08 22:33:59 103
原创 Android编程入门-第60天
今天学习NerdLauncher有关内容NerdLauncherFragment.javaimport android.content.Intent;import android.content.pm.ActivityInfo;import android.content.pm.PackageManager;import android.content.pm.ResolveInfo;imp...
2018-05-08 22:31:19 106
原创 Android编程入门-第59天
学习XMLDrawablebutton_beat_box.xml<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/button_beat_box_pressed" android:state_pr...
2018-05-06 21:59:29 120
原创 Android编程入门-第58天
今天进行主题方面的修改:list_item_sound.xml<?xml version="1.0" encoding="utf-8"?><layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"...
2018-05-06 21:54:02 91
原创 Android编程入门-第57天
今天进行单元测试代码的编写ExampleUnitTest.javaimport org.junit.Test;import static org.junit.Assert.*;public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { ass...
2018-05-04 21:16:37 103
原创 Android编程入门-第56天
colors.xml<?xml version="1.0" encoding="utf-8"?><resources> <color name="colorPrimary">#3F51B5</color> <color name="colorPrimaryDark">#30
2018-05-03 19:20:57 110
原创 Android编程入门-第55天
activity_fragment.xml<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/fragment_container" android:layout_width="match_parent" android:layout_...
2018-05-03 19:19:03 85
原创 Android编程入门-第54天
Sound.javapublic class Sound { private String mAssetPath; private String mName; public Sound(String assetPath) { mAssetPath = assetPath; String[] components = assetPath.sp...
2018-05-02 22:16:01 92
原创 Android编程入门-第53天
BeatBoxFragment.javaimport android.databinding.DataBindingUtil;import android.os.Bundle;import android.support.annotation.Nullable;import android.support.v4.app.Fragment;import android.support.v7....
2018-05-02 22:14:46 106
原创 嵌入式开发阶段总结(2018.4)
1. C语言调用的mysqlAPI中mysql_real_query()一直执行失败解决方法:检查代码的时候发现在fork()之前调用了mysql_init(),这导致在分成多进程之后,mysql的connection被争用,出现了多个进程争抢临界资源的现象,导致sql无法正常执行,报出的错误码也在用户手册中查不到。后来把mysql_ini()放到对应的单个进程中,程序运行正常。2. 当一个进程的...
2018-05-01 19:49:26 333
原创 Android编程入门-第52天
BeatBoxActivity.javaimport android.support.v4.app.Fragment;import android.support.v7.app.AppCompatActivity;import android.os.Bundle;public class BeatBoxActivity extends SingleFragmentActivity { ...
2018-05-01 19:36:14 95
原创 Android编程入门-第51天
今天开始学习MVVM有关内容:BeatBox.javaimport android.content.Context;import android.content.res.AssetManager;import android.util.Log;import java.io.IOException;import java.util.ArrayList;import java.util.L...
2018-05-01 19:34:18 100
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人