1. activity_main.xml => tools:context=".MainActivity" => MainActivity.java …….I try first… is more better then post. ========= ========= ===== suggestion newbie ===== https://github.com/couchbaselabs/CouchbaseLite-DevDay-StarterKit https://github.com/couchbaselabs/GrocerySync-Android https://github.com/couchbaselabs/ToDoLite-Android (Hard Understand) SO see this first: http://sueboy.blogspot.com/2015/06/couchbase-todolist-get-database-sync.html ========= MainActivity.java  BuildConfig – 來自 build.gradle ( Module.app ) 目錄app – build.gradle  extends ActionBarActivity – http://blog.tonycube.com/2014/02/android-actionbarcompat-1.html  Intent – http://www.imyukin.com/?p=183 – http://kezeodsnx.pixnet.net/blog/post/27072894-android-----%E6%87%89%E7%94%A8%E7%A8%8B%E5%BC%8F%E8%87%AA%E6%88%91%E4%BB%8B%E7%B4%B9%E4%B9%8Bintent-resolution  startService – http://blog.maxkit.com.tw/2014/01/android-serviceintentservice.html – http://blog.kenyang.net/2012/11/android-startservice-vs-bindservice.html – http://blog.csdn.net/biezhihua/article/details/44439897 context.bindService() <==> context.startService() context.startService() ==> Service <==> IntentService

繼續閱讀

突然想到,他的basic auth,其實不是用來給系統用的,是給app用的 也就是app每一支都是用同樣的basicAuth id/pwd登入,區分 管理者和一般使用者 而一般使用者註冊後,帳密是另外開一個doucment,之後所有的文件管理是自己要控制的 跟mysql的一樣,不會給每個人有basic auth,權限管理,也是在sql下的時候,抓出資料做判斷 所以才會在 add user時,用restful curd,使用者代表不同的專案 ========== This is my think: couchbase basic auth is not for every body login. It is app connect to sync_gateway for auth. Example is have normal user and Admin user. Maybe login sync_gateway, that get different document、channel、sync. Normal user registered. The register data put in document, Maybe document name is “members” then system programmer need to control document show or not by permit.

繼續閱讀

RecyclerView onclick

RecyclerView step 3 step1 public class xxxxxxxx extends RecyclerView.Adapter<MyAdapter.ViewHolder> implements View.OnClickListener { step2 public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position viewHolder.textView.setOnClickListener(this); textView is findViewById(R.id.xxxxxxxxx) step3 @Override public void onClick(View view) { int viewId = view.getId(); if (viewId == R.id.xxxxxxxxx) { //which item click if (onItemClickListener != null) { onItemClickListener.onItemClick(view, (Integer) view.getTag()); } } } view.getTag() maybe null

繼續閱讀

https://developer.android.com/training/material/lists-cards.html I think many people, try to do this demo. But this demo is not good, because some things no show. like: RecyclerView .xml to a layout:…….only little, but ok, this not import. MyAdapter .xml no layout: this is bad. Get error in here. so, follow this do is better http://stackoverflow.com/questions/28407768/android-widget-linearlayout-cannot-be-cast-to-android-widget-textview-in-recycle Gorcyn is good guy~~ ^ ^ But what different with android demo (fxxxxxxxxxxxxxx) android: public ViewHolder(TextView v) { mTextView = v; good guy:

繼續閱讀

https://typeblog.net/tech/2015/04/06/google-released-seperate-webview.html Google Play Store 上发现了一个新的App: Android System WebView 用來更新 WebView 但只限官方的rom,因為 指向到 com.android.webview 和 com.google.android.webview 後者才有用 所以作者用 Xposed 處理

繼續閱讀

作者的圖片

Sue boy

Sueboy Can support You

CIO

Taiwan