原创 react-native-swipe-list-view 手動關閉row

<SwipeList renderHiddenRow={ (data, secdId, rowId, rowMap) => { <TouchableOpacity onPress={ _ => rowMap[`${secId}${ro

原创 解決VS code 中文亂碼

1.文件 2.首選項 3.設置 4.搜索 "files.autoGuessEncoding": flase  改爲 "files.autoGuessEncoding": true

原创 react-native 導入不同的包,相同的組件名

錯誤: import { Text } from 'react-native';  import Svg, {Text } from 'react-native-svg'; 正確: import * as Svg from 'react-

原创 react-native :Text文本過長時,不顯示最右邊部分文字

<View style={styles.textBox}> <Text style={[styles.nameText,{flexWrap:'wrap'}]} numberOfLines={1}>{data.name}</Text> </

原创 android 常用顏色對照表

類型常數                            顏色值色碼intBLACK                        -167772160xff000000intBLUE                        

原创 Android動畫:alpha、scale、translate、rotate、set的xml屬性及用法

轉自http://blog.csdn.net/harvic880925/article/details/39996643一、概述Android的animation由四種類型組成:alpha、scale、translate、rotate,對

原创 Android RelativeLayout 屬性

// 相對於給定ID控件android:layout_above 將該控件的底部置於給定ID的控件之上;android:layout_below 將該控件的底部置於給定ID的控件之下;android:layout_toLeftOf   

原创 Android系統版本與API等級對應關係表

轉自https://blog.csdn.net/wangsf1112/article/details/51545101安卓中由於不同版本的API會有一些變化,導致一些較早版本可能不支持新的方法,或者某些功能處理過程不太一樣,需要判斷當前版

原创 工具類(bitmap與drawable)

//bitmap轉換drawable public Drawable bitmapToDrawable(Bitmap bitmap) { BitmapDrawable bd = new BitmapDrawable(getResour

原创 android 毛玻璃效果工具類

package com.example.administrator.text2.util; import android.content.Context; import android.graphics.Bitmap; import an

原创 Error:(1, 0) Plugin with id 'com.android.application' not found

轉載https://blog.csdn.net/qq_36317441/article/details/77777802從github上下載了一個工程,導入Android studio的時候就報了Error:(1, 0) Plugin w

原创 view疊加顯示

<?xml version="1.0" encoding="utf-8"?><FrameLayout xmlns:android="http://schemas.android.com/apk/res/an

原创 android studio好用的插件

1.Android ButterKnife Zelezny配合ButterKnife實現註解,從此不用寫findViewById,想着就爽啊。在Activity,Fragment,Adapter中選中佈局xml的資源id自動生成butte

原创 android 獲取資源文件 r.drawable中的圖片轉換爲drawable、bitmap

1、Resources resources = mContext.getResources();Drawable drawable = resources.getDrawable(R.drawable.a);imageview.setBa

原创 獲得當前背景

 Drawable bg= getBackground();        //bg包括color和Drawable        if (bg instanceof ColorDrawable) {