原创 ubuntu終端路徑太長

解決ubuntu終端顯示路徑太長問題 sudo vim ~/.bashrc 找到這樣的文字 if [ "$color_prompt " = yes ]; then PS1 ='${debian_chroot:+($

原创 interactor與presenter的關係

presenter的任務 presenter在mvp中是一個粘合劑的作用,將view和model結合起來。 它調度了UI邏輯和數據邏輯,然而UI邏輯和數據邏輯的具體實現,Presenter是不用關心的,只需要處理好如何調度,和

原创 處理String特殊符號

半角轉化全角 public static String toDBC(String str){ char[] c=str.toCharArray(); for(int i=0;i<c.length();i++){

原创 Activity之間簡單數據傳遞

利用安卓自帶Bundle或者Intent對象封裝數據即可,代碼如下: Intent i=new Intent(MainActivity.this,Second.class); Bundle bundle=new Bundle();

原创 ButterKnife8.4的錯誤解決

4:遇到的問題: Error:(15, 12) 錯誤: @BindView-annotated class incorrectly in Android framework package. (android.jrhlive.c

原创 android-async-http

添加依賴: compile ‘com.loopj.android:android-async-http:1.4.9’ 代碼實現: public class AsyncHttpHelper extends AsyncHttpR

原创 Volley的StringRequest()簡用

volley jar包導入 AS在project視圖下,copy volley.jar到libs,然後右鍵設置爲libs jar。 配置一個Application import android.app.Application;

原创 Activity之間的對象數據傳遞

利用Bundle封裝數據,通過Intent攜帶Bundle,具體實現如下: public class User implements Parcelable{ //這個接口實現了從Percel容器讀取Person數據,並返回Pers

原创 Dagger2在AS中依賴添加

步驟一 //在整個項目的build.gradle中添加 //位置是在dependencies內部 classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'

原创 NDK工程錯誤

錯誤1 What went wrong: Execution failed for task ‘:app:compileDebugNdk’. Error: NDK integration is deprecated

原创 android的View的大小寫字母問題

Button的大小寫字母 android:textAllCaps="false"#設置了默認字母不大寫 點贊 收藏 分享 文章舉報 NealKafuly 發佈了35 篇

原创 TypeArray的理解

TypeArray的目的 爲了程序員更好地獲取R文件中定義好的屬性值 TypeArray使用 public CustomView(Context context,AttributeSet set,int defStyleAtt

原创 爲什麼要使用MVP

MVC模式 在往常一樣,我們都是用MVC來入門一個app,M-model,V-view,C-controller。 在android中的controller也就是activity、fragment等, 別忘了他們也是幹初始化v

原创 Python抓取極客學院開放數據

Python 是比較美的語言,相見恨晚 抓數據的一般步驟 首先,鎖定目標,也就是確定網站鏈接的格式。 其次,在瀏覽器中或者在wireshark中嘗試抓包,分析數據,主要是利用瀏覽器的查看源碼功能,分析需要抓包的數據的結構特點

原创 ButterKnife在AS依賴添加

步驟一 在AS中安裝好ButterKnife Android Zelezny插件 . 步驟二 //在project的build.gradle文件添加 //位置是在dependencies內部 classpath 'c