日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

自定义 FlowLayout流式布局搜索框 加 GreenDao存取搜索记录,使用RecyclerView展示

發布時間:2024/3/24 编程问答 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 自定义 FlowLayout流式布局搜索框 加 GreenDao存取搜索记录,使用RecyclerView展示 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

輸入框布局的shape

<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"><corners android:radius="30dp"/><stroke android:width="2dp" android:color="@color/darkgray"/><solid android:color="@color/color_white"/><padding android:top="8dp" android:bottom="8dp" android:left="5dp"/> </shape>


熱搜流式布局的shape

<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" > <!-- <solid android:color="@android:color/white"/>--> <corners android:radius="28dp"/><stroke android:width="1dp" android:color="#3799f4"/><padding android:left="5dp" android:right="5dp" android:top="5dp" android:bottom="5dp" /> </shape>


自定義流式布局View的主體內容

import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; import java.util.ArrayList; import java.util.List;/** * Created by Dewey . * 自定義流式布局顯示搜索框 */ public class FlowLayout extends ViewGroup {public FlowLayout(Context context, AttributeSet attrs, int defStyle){super(context, attrs, defStyle);}public FlowLayout(Context context, AttributeSet attrs) {this(context, attrs, 0);}public FlowLayout(Context context) {this(context, null);}@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {int sizeWidth = MeasureSpec.getSize(widthMeasureSpec);int modeWidth = MeasureSpec.getMode(widthMeasureSpec);int sizeHeight = MeasureSpec.getSize(heightMeasureSpec);int modeHeight = MeasureSpec.getMode(heightMeasureSpec);// 如果是warp_content情況下,記錄寬和高 int width = 0;int height = 0;// 記錄每一行的寬度與高度 int lineWidth = 0;int lineHeight = 0;// 得到內部元素的個數 int cCount = getChildCount();for (int i = 0; i < cCount; i++){// 通過索引拿到每一個子view View child = getChildAt(i);// 測量子View的寬和高,系統提供的measureChild measureChild(child, widthMeasureSpec, heightMeasureSpec);// 得到LayoutParams MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams();// View占據的寬度 int childWidth = child.getMeasuredWidth() + lp.leftMargin + lp.rightMargin;// View占據的高度 int childHeight = child.getMeasuredHeight() + lp.topMargin + lp.bottomMargin;// 換行 判斷 當前的寬度大于 開辟新行 if (lineWidth + childWidth > sizeWidth - getPaddingLeft() - getPaddingRight()){// 對比得到最大的寬度 width = Math.max(width, lineWidth);// 重置lineWidth lineWidth = childWidth;// 記錄行高 height += lineHeight;lineHeight = childHeight;}else // 未換行 {// 疊加行寬 lineWidth += childWidth;// 得到當前行最大的高度 lineHeight = Math.max(lineHeight, childHeight);}// 特殊情況,最后一個控件 if (i == cCount - 1){width = Math.max(lineWidth, width);height += lineHeight;}}setMeasuredDimension(modeWidth == MeasureSpec.EXACTLY ? sizeWidth : width + getPaddingLeft() + getPaddingRight(),modeHeight == MeasureSpec.EXACTLY ? sizeHeight : height + getPaddingTop() + getPaddingBottom()// );}/** * 存儲所有的View */ private List<List<View>> mAllViews = new ArrayList<List<View>>();/** * 每一行的高度 */ private List<Integer> mLineHeight = new ArrayList<Integer>();@Override protected void onLayout(boolean changed, int l, int t, int r, int b){mAllViews.clear();mLineHeight.clear();// 當前ViewGroup的寬度 int width = getWidth();int lineWidth = 0;int lineHeight = 0;// 存放每一行的子view List<View> lineViews = new ArrayList<View>();int cCount = getChildCount();for (int i = 0; i < cCount; i++){View child = getChildAt(i);MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams();int childWidth = child.getMeasuredWidth();int childHeight = child.getMeasuredHeight();// 如果需要換行 if (childWidth + lineWidth + lp.leftMargin + lp.rightMargin > width - getPaddingLeft() - getPaddingRight()){// 記錄LineHeight mLineHeight.add(lineHeight);// 記錄當前行的Views mAllViews.add(lineViews);// 重置我們的行寬和行高 lineWidth = 0;lineHeight = childHeight + lp.topMargin + lp.bottomMargin;// 重置我們的View集合 lineViews = new ArrayList<View>();}lineWidth += childWidth + lp.leftMargin + lp.rightMargin;lineHeight = Math.max(lineHeight, childHeight + lp.topMargin+ lp.bottomMargin);lineViews.add(child);}// for end // 處理最后一行 mLineHeight.add(lineHeight);mAllViews.add(lineViews);// 設置子View的位置 int left = getPaddingLeft();int top = getPaddingTop();// 行數 int lineNum = mAllViews.size();for (int i = 0; i < lineNum; i++){// 當前行的所有的View lineViews = mAllViews.get(i);lineHeight = mLineHeight.get(i);for (int j = 0; j < lineViews.size(); j++){View child = lineViews.get(j);// 判斷child的狀態 if (child.getVisibility() == View.GONE){continue;}MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams();int lc = left + lp.leftMargin;int tc = top + lp.topMargin;int rc = lc + child.getMeasuredWidth();int bc = tc + child.getMeasuredHeight();// 為子View進行布局 child.layout(lc, tc, rc, bc);left += child.getMeasuredWidth() + lp.leftMargin+ lp.rightMargin;}left = getPaddingLeft();top += lineHeight;}}/** * 與當前ViewGroup對應的LayoutParams */ @Overridepublic LayoutParams generateLayoutParams(AttributeSet attrs){return new MarginLayoutParams(getContext(), attrs);}}


主MainActivity布局

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_height="match_parent" android:layout_width="match_parent" android:orientation="vertical" ><LinearLayout android:layout_marginTop="10dp" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" ><ImageView android:layout_gravity="center_vertical" android:layout_marginLeft="8dp" android:layout_width="50dp" android:layout_height="50dp" android:src="@drawable/left" android:id="@+id/backJian" /><LinearLayout android:layout_weight="1" android:layout_width="0dp" android:layout_height="wrap_content" ><EditText android:id="@+id/edit_input" android:layout_gravity="center_vertical" android:layout_margin="10dp" android:drawableLeft="@drawable/search_icon" android:drawablePadding="5dp" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/search_edittext_shape" android:textSize="16sp" android:imeOptions="actionSearch" android:inputType="text" android:hint="請輸入關鍵字"/></LinearLayout><ImageView android:src="@drawable/right" android:id="@+id/search_btn" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_marginTop="10dp" android:layout_marginBottom="10dp" android:layout_gravity="center_vertical" android:layout_width="50dp" android:layout_height="50dp"/></LinearLayout><TextView android:layout_width="match_parent" android:layout_marginTop="10dp" android:layout_height="1dp" android:background="#050505" /><!-- 流式布局 --> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginTop="10dp" android:textStyle="bold" android:textSize="18sp" android:text="熱搜" /><!--自定義的flowlayout,引用的是自己的包名--> <com.example.custom.FlowLayout android:layout_height="wrap_content" android:layout_width="match_parent" android:layout_marginLeft="10dp" android:layout_marginTop="10dp" android:id="@+id/id_flowlayout" ></com.example.custom.FlowLayout><TextView android:layout_width="match_parent" android:layout_marginTop="10dp" android:layout_height="1dp" android:background="#050505" /><TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginTop="10dp" android:textStyle="bold" android:textSize="18sp" android:text="搜索記錄" /><android.support.v7.widget.RecyclerView android:id="@+id/history_recyclerView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margin="10dp"></android.support.v7.widget.RecyclerView><Button android:layout_width="match_parent" android:layout_marginRight="60dp" android:layout_marginLeft="60dp" android:layout_height="40dp" android:background="#ffffff" android:text="清空歷史搜索" android:id="@+id/clearbtn"/></LinearLayout>

主 MainActivity功能代碼

import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.text.TextUtils; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; import org.greenrobot.greendao.query.Query; import java.util.ArrayList; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick;/* 搜索框頁面: 1. 搜索框輸入內容 2. 自定義流式布局,展示搜索的菜名記錄 3. 使用GreenDao操作數據庫,保存搜索記錄,當下次進入搜索頁面,能展示記錄 4. 點擊清除按鈕清除數據庫內容 5. 點擊搜索,根據搜索內容,請求數據 */ public class MainActivity extends Activity {@BindView(R.id.edit_input)EditText editInput;@BindView(R.id.search_btn)ImageView searchBtn;@BindView(R.id.history_recyclerView)RecyclerView historyRecyclerView;@BindView(R.id.id_flowlayout)FlowLayout flowlayout;private HistoryAdapter historyAdapter;List<String> list = new ArrayList<>(); //歷史搜索輸入數據集合 private Query<SearchDaoBean> queryDao; //歷史搜索查詢數據集合 private SearchDaoBeanDao dao;private String flows[] = {"應急啟動電源", "餐桌", "粽子散裝","智能手表", "摩托車配件", "批發方便面","王中王火腿", "手機", "桶裝礦泉水","U64G", "機械革命電腦", "洗發水","護發素", "奶粉", "search", "logcat" };@Override protected void onCreate(@Nullable Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);ButterKnife.bind(this);//自定義流式布局初始化視圖 initChildViews();//設置搜索記錄布局視圖 initHistoryResultData();//獲取數據庫實例,把歷史記錄顯示在頁面上 dao = MyApplication.session.getSearchDaoBeanDao();queryDao = dao.queryBuilder().orderAsc(SearchDaoBeanDao.Properties.Id).build();List<SearchDaoBean> daoBeanList = queryList();for (int i = 0; i < daoBeanList.size(); i++) {list.add(daoBeanList.get(i).getSelectGoods());}}//流式布局 public void initChildViews() {ViewGroup.MarginLayoutParams lp = new ViewGroup.MarginLayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);//下面為 熱搜流式布局子條目間距 lp.leftMargin = 10;lp.rightMargin = 10;lp.topMargin = 10;lp.bottomMargin = 10;for(int i = 0; i < flows.length; i ++){TextView view = new TextView(this);view.setText(flows[i]);view.setTextSize(21);//view.setTextColor(Color.WHITE); view.setBackgroundDrawable(getResources().getDrawable(R.drawable.label_bg));//添加到父View flowlayout.addView(view,lp);}}private void initHistoryResultData() {//設置搜索結果適配器以及布局管理器 historyRecyclerView.setLayoutManager(new LinearLayoutManager(MainActivity.this, LinearLayoutManager.VERTICAL, false));historyAdapter = new HistoryAdapter(MainActivity.this, list);historyRecyclerView.setAdapter(historyAdapter);}@OnClick({R.id.search_btn, R.id.clearbtn , R.id.backJian})public void onViewClicked(View view) {switch (view.getId()) {//點擊搜索按鈕,傳遞數據RecyclerView顯示,并存入數據庫 case R.id.search_btn://判斷輸入為空情況下 String string = editInput.getText().toString().trim();if (TextUtils.isEmpty(string) || string.length() == 0) {Toast.makeText(this, "輸入內容不能為空", Toast.LENGTH_SHORT).show();return;}//保存搜索歷史到數據庫 String trim = editInput.getText().toString().trim();SearchDaoBean daoBean = new SearchDaoBean(null, "1775", "TheScar", trim);dao.insert(daoBean);historyAdapter.notifyDataSetChanged();break;//清空歷史搜索集合,,清空數據庫,刷新數據 case R.id.clearbtn:list.clear();deleteAllData();historyAdapter.notifyDataSetChanged();break;//銷毀當前頁面 case R.id.backJian:finish();break;default:break;}}//查詢全部數據的方法 private List<SearchDaoBean> queryList() {List<SearchDaoBean> daoBeans = queryDao.list();return daoBeans;}//刪除所有數據,即清空歷史記錄 public void deleteAllData() {dao.deleteAll();} }


歷史搜索記錄布局適配器?HistoryAdapter?

import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.example.duhongwang20180601.R; import java.util.List;/** * 歷史搜索記錄數據 適配器 */ public class HistoryAdapter extends RecyclerView.Adapter<HistoryAdapter.ViewHolder>{private Context context;private List<String> list;public HistoryAdapter(Context context, List<String> list) {this.context = context;this.list = list;}@Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {View view = View.inflate(context, R.layout.layout_history, null);ViewHolder holder = new ViewHolder(view);return holder;}@Override public void onBindViewHolder(ViewHolder holder, int position) {holder.tv.setText(list.get(position));}@Override public int getItemCount() {return list.size();}public class ViewHolder extends RecyclerView.ViewHolder {private TextView tv;public ViewHolder(View itemView) {super(itemView);tv = (TextView)itemView.findViewById(R.id.history_text);}} }


適配器對應的布局?layout_history.xml

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"><TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/history_text" android:layout_margin="7dp" android:textSize="15sp" android:text="" /></LinearLayout>


GreenDao全局配置初始化?MyApplication?


import android.app.Application; import com.example.duhongwang20180601.dao.DaoMaster; import com.example.duhongwang20180601.dao.DaoSession; import com.facebook.drawee.backends.pipeline.Fresco; import org.greenrobot.greendao.database.Database;/** * Fresco GreenDao 的初始化全局配置類 */ public class MyApplication extends Application {//抽取為全局變量 public static DaoSession session;@Override public void onCreate() {super.onCreate();//1. Fresco Fresco.initialize(this);//2. GreenDao DaoMaster.DevOpenHelper helper = new DaoMaster.DevOpenHelper(this, "rikao");Database db = helper.getWritableDb();session = new DaoMaster(db).newSession();} }

搜索框輸入數據封裝為 GreenDao bean 類import org.greenrobot.greendao.annotation.Entity; import org.greenrobot.greendao.annotation.Id; import org.greenrobot.greendao.annotation.Generated;/** * Created by Dewey . * 搜索框輸入數據封裝為 DreenDao bean */ @Entity public class SearchDaoBean {@Id(autoincrement = true)private Long id;private String uid;private String uname;private String selectGoods;@Generated(hash = 1024397953)public SearchDaoBean(Long id, String uid, String uname, String selectGoods) {this.id = id;this.uid = uid;this.uname = uname;this.selectGoods = selectGoods;}@Generated(hash = 1406499419)public SearchDaoBean() {}public Long getId() {return this.id;}public void setId(Long id) {this.id = id;}public String getUid() {return this.uid;}public void setUid(String uid) {this.uid = uid;}public String getUname() {return this.uname;}public void setUname(String uname) {this.uname = uname;}public String getSelectGoods() {return this.selectGoods;}public void setSelectGoods(String selectGoods) {this.selectGoods = selectGoods;}}


布局用到的圖片

left.png


right.png



search_icon.png


功能依賴

//1. Recycycleview compile 'com.android.support:recyclerview-v7:26.+'//2.添加GreenDao及數據庫database的依賴 compile 'org.greenrobot:greendao:3.2.2' compile 'org.greenrobot:greendao-generator:3.0.0' compile 'net.zetetic:android-database-sqlcipher:3.5.7@aar' //數據庫加密(較新版本)//7.ButtonKnife //butterknifeStudio3.0版本上需使用以下8.8.1版本(下面2行代碼都要加) compile 'com.jakewharton:butterknife:8.8.1' annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'

本文章到此結束,如有見解,請指出。

  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
文章標簽:?流式布局搜索框

搜索框布局+流式布局代碼

背景圓角(shape_back) xml version="1.0" encoding="utf-8"?> shape xmlns:android="http://schemas.android.co...

?shilei_comeon

2018-01-03 13:02:25

閱讀數:86

android搜索熱詞(熱門標簽)流式布局的實現

先看下效果圖1、流式布局實現繼承ViewGroup,重寫onMeasure,onLayout方法。代碼如下:package com.example.lin.flowlayoutdemo;import ...

?zhoulin541

2016-07-13 14:32:32

閱讀數:2828

搜索框布局+流式布局代碼 - shilei_comeon的博客 - CSDN博客

android:layout_height="wrap_content"?android:text="搜索" /> </Linear...android:background="#AAAAAA" /> //流式布局 <TextView?android:layout_...

2018-1-3

首先流式布局搜索框?- CSDN博客

首先流式布局搜索框2018年05月31日 08:57:01 閱讀數:1 依賴 implementation ...rxandroid:2.0.1' implementation 'com.squareup.retrofit2:retrofit:2.1.0' ...

2018-5-31

缺牙者速領高額補貼,種植牙最高援助50%,按名領取!京一口腔 · 頂新

Android 熱門搜索,自定義流式布局,自動換行,自動補齊

二話不說,先上圖,如果是你們苦苦尋找的效果,請接著往下看。 絕對干貨,直接上代碼,直接講用法,不講原理,不講思路,不繞彎彎,就是這么實在!就是喜歡你們復制粘貼! 想要知道如何實現的,代碼里面的...

?hzlxtq123

2016-12-22 14:51:09

閱讀數:632

Android搜索框存儲搜索記錄 - CSDN博客

越來越多的App都用到了搜索框,公司的項目也用到了搜索框,還提出來以下需求:輸入...Android?流式布局 + 搜索記錄,包括多數據本地存儲 轉載地址為:http://www....

2018-5-25

FlowLayout流式布局實現搜索清空歷史記錄 - CSDN博客

效果圖:點擊搜索框將搜索的歷史在流式布局中展示出來,清空歷史記錄就會將歷史清空...<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" ...

2018-5-18

Android自定義流式布局/自動換行布局

Android自定義流式布局/自動換行布局 最近,Google開源了一個流式排版庫“FlexboxLayout”,功能強大,支持多種排版方式,如各種方向的自動換行等,具體資料各位可搜索學習^_^。 ...

?zengd0

2016-08-14 23:21:04

閱讀數:2480

Android?流式布局之自動換行

import android.content.Context; import android.util.AttributeSet; import android.view.View; import a...

?yeyuewushang

2017-07-14 11:02:02

閱讀數:721

Android?仿快播搜索框上方懸浮的文字搜索

仿快播搜索框頁面懸浮的搜索關鍵字漂浮、飛入飛出的效果 綜合評分:4 收藏(4)...android?流添加 熱門搜索,切換歷史與熱門 上傳資源 uuid12345 關注 積分97 ...

2018-5-8

自定義view+流式布局+greendao歷史搜索?- CSDN博客

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="...FlowLayout流式布局實現搜索清空歷史記錄 效果圖:點擊搜索框將搜索的歷史在流式...

2018-5-30

Android學習筆記:自定義實現流式布局

前幾天在開發項目的時候,有一個需求是展示歷史搜索啟示 ,展示的樣式是像瀑布流一樣(每一行展示的控件個數根據控件的內容不同而不相同,當一行展示滿后,自動換行展示)。最開始是自定義LinearLayout...

?true100

2015-12-29 11:09:31

閱讀數:2054

民間治痛風妙招,輕松遠離痛風困擾黃河醫院 · 頂新

搜索框歷史記錄,流式布局 - CSDN博客

搜索框歷史記錄,流式布局2018年05月02日 09:46:51 閱讀數:2 public class ...<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"?andr...

2018-5-2

Android中關鍵詞的流式布局 - CSDN博客

項目的開發過程中,用到了如上圖所示的流式布局,在一番查找之后,在一葉飄舟大神博客的基礎上,進行了一些編寫,由于之前基本沒有使用過自定義的控件,所以屬于邊敲...

2018-5-22

自定義流式布局實現搜索歷史

public class FlowLayout extends ViewGroup{ public FlowLayout(Context context, AttributeSet attr...

?qq_41161483

2018-05-28 16:53:25

閱讀數:40

Android自定義ViewGroup實現流式布局

實現寬度不足自動換行的流式布局: FlowLayout.java package com.jackie.flowlayout; import android.content.Context; imp...

?shineflowers

2015-08-28 18:02:44

閱讀數:2166

Android搜索控件簡介

Android?搜索框:SearchView 的屬性和用法詳解?Android之搜索功能的實現?Android搜索控件SearchView的用法?Android自定義控件(打造流布局實現熱門搜索標簽) 立即下載...

2018-5-4

undefined

自定義view實現流式布局

顯示效果如下,自定義view,重寫onMeasure方法,測量wrap_content模式下控件的寬高,重寫onLayout的方法,布局里面的子view,支持paddign屬性.其實整個邏輯并不復雜,...

?lulalei

2017-07-25 14:08:50

閱讀數:170

搜索歷史記錄流式布局展示

Config package com.tan.searchhistory.constants; public class Config { //數據庫 public sta...

?legend12300

2018-01-11 14:03:09

閱讀數:176

百度地圖自定義搜索框控件,并添加事件

function CreateControl() { ?? ??? ??? ?function ZoomControl() { ?? ??? ??? ??? ?// 設置默認??课恢煤推屏?...

?two_people

2016-11-27 16:32:51

閱讀數:3003

流式布局FlowLayout以及動態添加Item的實現

http://blog.csdn.net/lmj623565791/article/details/38352503?,本文出自【張鴻洋的博客】 1、概述 上一篇已經基本給大家介紹了如何自定義Vi...

?qq_34247200

2017-04-01 15:39:26

閱讀數:1059

Android自定義控件之流式布局

腦筋急轉: 在一個房間里,有油燈 ,暖爐及壁爐。現在,想要用一根火柴將三個器具點燃,請問首先應該點燃哪一個? 請查看文章最后有有解析...

?zl18603543572

2016-03-12 22:28:13

閱讀數:2231

【Android】掌握自定義LayoutManager(二) 實現流式布局

轉載請標明出處: http://blog.csdn.net/zxt0601/article/details/52956504 本文出自:【張旭童的博客】 本系列文章相關代碼傳送門: 自...

?zxt0601

2016-10-28 17:58:17

閱讀數:17266

Android自定義控件--流式布局(FlowLayout)--自動適配

在android開發中,隨著開發需求的不斷提升,android原生的控件在很大程度上已不能滿足開發者以及用戶的需求,為了更好的增加用戶體驗,更有利的維護UI,在一個完整的程序中,自定義控件往往是不可或...

?MyLoveyaqiong

2016-11-03 01:37:59

閱讀數:4193

Android仿天貓搜索歷史記錄顯示自定義布局

這兩天都在弄搜索界面,網上查看了下,參考了下面這位兄弟的: https://www.oschina.net/question/54100_32893? 順便把圖也搬了 這個有個缺點,就是必須全屏,...

?ming6365630

2017-07-26 10:35:53

閱讀數:1298

Android中的自定義View(二)之?流式布局實現

我們在上一篇文章《Android中的自定義View》中介紹過自定義View的幾種方式,并通過示例一演示了“直接繼承View”的自定義View的使用情況。今天接著來介紹自定義View里稍為復雜的“直接繼...

?lyz_zyx

2017-10-10 11:52:09

閱讀數:286

Android自定義View實現流式布局TextView

2016年12月30日?18KB?下載

流式按鈕布局-熱門搜索-歷史搜索

App搜索頁面經常用到關鍵詞提示,例如手機淘寶的【歷史搜索】,網易云音樂的【熱門搜索】。為了方便使用,我寫了一個可以流式布局按鈕的view并封裝?!疚哪└竭\行效果及demo】思考1.需要哪些樣式? 按...

?RachalZhou

2016-11-24 19:37:17

閱讀數:160

在導航欄上添加搜索框的問題

自定義一個搜索框添加到導航欄上, ?_searchBar = [[ZJBSearchBar alloc]initWithFrame:CGRectMake(7,6, screenSize.wi...

?qq_35340833

2016-07-11 11:09:21

閱讀數:282

個人資料

wrpbk

關注原創
34
粉絲
4
喜歡
0
評論
0
等級:
訪問:
1351
積分:
342
排名:
23萬+
勛章:























總結

以上是生活随笔為你收集整理的自定义 FlowLayout流式布局搜索框 加 GreenDao存取搜索记录,使用RecyclerView展示的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 国内激情| 欧美亚洲专区 | 久久久久久一 | 亚洲av熟女一区 | 亚洲午夜激情视频 | 91波多野结衣 | 黄页视频在线免费观看 | 精品熟女一区二区 | 午夜精品久久久久久久久久久久久蜜桃 | 男女裸体无遮挡做爰 | 91精品国产色综合久久不8 | 中文字幕日韩久久 | 日韩欧美精品在线播放 | 日本黄视频在线观看 | 精品裸体舞一区二区三区 | 双性娇喘浑圆奶水h男男漫画 | 久青草国产在线 | av先锋资源网 | 黄色欧美在线观看 | 日日日夜夜操 | 亚洲高清色图 | 三级三级久久三级久久18 | 2025av在线播放 | 亚洲精品免费视频 | 开心春色激情网 | 国产乱码精品一区二区三区忘忧草 | 久久涩综合 | 欧美精品在线一区 | 一区在线免费观看 | 两性动态视频 | 香蕉国产在线视频 | 麻豆传媒在线 | 日本少妇在线 | 特级精品毛片免费观看 | 国产成a人亚洲精品 | 成年人国产 | 国产亚洲欧美日韩精品一区二区三区 | 久久久国产精品久久久 | 成人免费大全 | 国产成人精品国内自产拍免费看 | 亚洲一区在线免费 | 日本全黄裸体片 | 午夜精品久久久久久99热 | 99国产精品国产免费观看 | 天天操天天看 | 波多野吉衣av | 亚洲国产精品女人 | 国产成人av片 | 欧美日韩专区 | 99久久久无码国产精品6 | 久久久久亚洲av片无码 | 日韩免费在线播放 | 亚洲熟女乱色一区二区三区 | 欧美亚洲色图视频 | 亚洲国产成人91porn | 国产主播在线一区 | 爱草在线| 99久久免费看精品国产一区 | 欧美成人精品欧美一 | 国内自拍真实伦在线观看 | 人人妻人人澡人人爽国产一区 | 亚洲最大福利视频 | 日韩亚洲区 | 按摩害羞主妇中文字幕 | 亚洲精品国产成人av在线 | xxxxx黄色 | www.国产视频.com| 欧美高清hd19| 亚洲一区在线观 | 国产精品色 | 最新的黄色网址 | 96超碰在线 | 娇妻被老王脔到高潮失禁视频 | 色噜噜在线 | 日本黄网站在线观看 | 久久久国产精品x99av | 久久艹中文字幕 | 久久久噜噜噜www成人 | 欧美国产一区二区 | 精品久久久久久久久久久 | 美女视频一区二区三区 | av网在线| 精品伊人久久 | 夜夜艹 | 国产精品久久久久久三级 | 欧美性生交片4 | 欧美日韩小视频 | 理论片高清免费理伦片 | 在线观看免费高清在线观看 | 夜夜嗨av一区二区三区四区 | 伊人成综合 | 国产精品ⅴa有声小说 | 我们2018在线观看免费版高清 | 午夜性刺激免费视频 | 91精品国产99久久久久久 | 国产女人高潮时对白 | 久热这里只有 | wwww日本60| 午夜伦理在线观看 |