搜索历史

这篇博客详细介绍了如何在Android应用中实现搜索视图(SearchView)的功能,并结合自定义布局(包括MyFlowLayout和MyListView)进行优化,提供了一个完整的主活动(MainActivity)结构,同时探讨了适配器(Adapter)在搜索功能中的应用。
摘要由CSDN通过智能技术生成

布局====================================================================

main_activity=============================================================

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">

            <com.example.liushibuju.View.MySearchView
                android:id="@+id/mySearchView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"></com.example.liushibuju.View.MySearchView>

            <TextView
                android:id="@+id/sousuo"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="搜索"
                android:textSize="20sp" />
        </LinearLayout>

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="20px"
            android:text="热门搜索"
            android:textSize="36px" />

        <com.example.liushibuju.View.MyFlowLayout
            android:id="@+id/flow_hot_search"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <Button
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="#F00"
                android:text="电饭煲" />

            <Button
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="#F00"
                android:text="手机" />


        </com.example.liushibuju.View.MyFlowLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="20px">

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="历史搜索"
                android:textSize="36px" />



        </LinearLayout>

        <com.example.liushibuju.View.MyListView
            android:id="@+id/lv_search"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

        </com.example.liushibuju.View.MyListView>
        <Button
        android:id="@+id/iv_delete"
            android:layout_gravity="center"
            android:layout_marginTop="30dp"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="清初历史记录"/>
    </LinearLayout>

</ScrollView>

searchview_layout================&#

您可以通过以下方法删除Google搜索历史记录: 1. 首先,在Google Chrome浏览器中,输入"chrome://version"并查看浏览器信息。在个人资料路径中找到History和History-journal文件的位置。 2. 关闭浏览器,然后删除这两个文件,以删除已有的历史记录。\[1\] 如果您想要以更细微的方式删除历史记录,可以按照以下步骤进行操作: 1. 删除整个搜索历史记录以及其他相关资料。您可以在计算机旁执行以下操作,或者在Android设备上进行某些操作。\[2\] 2. 如果您不知道要删除的项目的日期,可以使用页面顶部的搜索字段进行搜索。您还可以使用“按日期和产品过滤”选项进一步缩小结果范围。找到要删除的活动后,点击三点菜单,然后选择删除。\[3\] 希望这些方法能帮助您删除Google搜索历史记录。 #### 引用[.reference_title] - *1* [google 输入栏不显示历史搜索记录方法](https://blog.csdn.net/weixin_42344452/article/details/127846931)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* *3* [谷歌浏览器搜索框记录_如何清除您的Google搜索记录](https://blog.csdn.net/cum44153/article/details/109041985)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值