原创 (筆記)android設置沉浸式佈局

這篇文章只是筆記,如果我的方法不行的話。 請參考這位博主的文章。我之後出了一些問題在這裏找到了答案。希望能幫到你。   https://www.jianshu.com/p/d32c6a0a4310       1.將style.xml文件

原创 數組元素倒置

// for 循環 for (int start = 0,end = len-1; start < end; start++,end--) { int temp = a[start]; a

原创 選擇排序的兩種實現方式(C語言)

int main(void){ int a[] = {10,7,3,46,32,21,8}; int len = sizeof(a) / sizeof(a[0]); printf("排序前:"

原创 (筆記)android獲取手機支持的所有傳感器

// 獲取傳感器管理器 mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); // 通過傳感器管理器對象獲得

原创 SET PASSWORD FOR user1@localhost=PASSWORD('1234');報語法錯誤

 一、錯誤: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the ri

原创 使用Virtualbox在移動硬盤上安裝Linux

一、在Virtualbox上點擊New彈出以下界面,在Machine Folder標題那裏點擊下拉菜單並選擇Other,選中你的移動硬盤,並在移動硬盤下面新建一個目錄Virtualbox VMs,最後點擊Create  二、點擊Crea

原创 使用retrofit上傳實體類的信息到服務端

服務端 /** * springboot會自動將返回類型轉換成JSON格式並返回 * @param requestVo * @return */ @PostMapping(value = "login.do"

原创 nginx-1.15.12/: Can't create 'nginx-1.15.12'解決方法

sudo tar -zxvf nginx-1.15.12 前面加個sudo ,因爲權限不足。

原创 (筆記)關於FragmentNavigator中的instantiateFragment() deprecated的替代方案

1. 代碼: FragmentFactory factory = mManager.getFragmentFactory(); fragment = factory.instantiate(mContext.getClassLoade

原创 (筆記)爲RecyclerView的每個item設置”點擊時產生波紋效果“

一、兩條關鍵代碼 android:clickable="true" android:foreground="?attr/selectableItemBackground"   二、示例 1.Normal版 <?xml version=

原创 (筆記)Toolbar的標題居中顯示的解決方案

1.XML代碼 <com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" android:l

原创 (筆記)Mac下耳機左右聲道不平衡(左邊小右邊大或者右邊大左邊小)的解決方法

1.打開System Preferences 2.點擊Soud(聲音) 3.把Balance的進度條拉到中間位置就OK啦!(Output volume是你當前耳機音量的大小)

原创 Android 自定義Button

Youtube地址:https://www.youtube.com/watch?v=nlPtfncjOWA   效果圖: (效果是android studio的preview效果,其中stroke按鈕中間是透明的,而不是灰色。)    

原创 Androidx library下無法使用FloatingActionButton的解決方法

一、在module下的buid.gradle文件添加 implementation 'com.google.android.material:material:1.0.0' 二、在佈局文件中添加 <android.support.d