通讯录提示颜色修改

首先根据log信息定位到app当前运行的activity,然后查找的要修改的framework

 private DefaultContactBrowseListFragment mContactFragment;
 mContactFragment = (DefaultContactBrowseListFragment) fragmentManager
                .findFragmentByTag(CONTACT_TAG);

根据上面的信息定位到DefaultContactBrowseListFragment,查看适配器

 @Override
    protected ContactListAdapter createListAdapter() {
        DefaultContactListAdapter adapter = new DefaultContactListAdapter(getContext(), mSectionsHandler);
        adapter.setSectionHeaderDisplayEnabled(isSectionHeaderDisplayEnabled());
        boolean showPhoto = getResources().getBoolean(R.bool.config_browse_list_show_images);
        adapter.setDisplayPhotos(showPhoto);
        if (showPhoto) {
            boolean reverse = getResources().getBoolean(R.bool.config_browse_list_reverse_images);
            adapter.setPhotoPosition(ContactListItemView.getDefaultPhotoPosition(reverse));
        }
        return adapter;
    }

最后我们找到关键应用的adapter,
 @Override
    protected View newHeaderView(Context context, int partition, Cursor cursor,
            ViewGroup parent) {
        LayoutInflater inflater = LayoutInflater.from(context);
        return inflater.inflate(R.layout.directory_header, parent, false);
    }

查看想对应的布局

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<!-- Layout used for list section separators. -->
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    style="@style/DirectoryHeader"
    android:id="@+id/directory_header"
    android:paddingLeft="?attr/list_item_padding_left"
    android:paddingRight="?attr/list_item_padding_right"
    android:paddingStart="?attr/list_item_padding_left"
    android:paddingEnd="?attr/list_item_padding_right"
    android:minHeight="@dimen/list_section_divider_min_height"
    android:layout_marginTop="@dimen/list_header_extra_top_padding"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    >
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center_vertical"
        android:paddingTop="4dp"
        android:paddingBottom="4dp"
        android:background="@color/account_header_separator_color"
        >
        <TextView
            android:id="@+id/label"
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:layout_marginLeft="8dip"
            android:layout_marginStart="8dip"
            android:textAppearance="@style/DirectoryHeaderStyle"
            android:singleLine="true"
            android:textAlignment="viewStart" />
        <TextView
            android:id="@+id/display_name"
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:layout_marginLeft="8dip"
            android:layout_marginRight="8dip"
            android:layout_marginStart="8dip"
            android:layout_marginEnd="8dip"
            android:textAppearance="@style/DirectoryHeaderStyle"
            android:singleLine="true"
            android:textAlignment="viewStart" />
        <TextView
            android:id="@+id/count"
            android:paddingTop="1dip"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:singleLine="true"
            android:textSize="12sp"
            android:textColor="@color/primary_text_color" />
    </LinearLayout>
</FrameLayout>


最终修改id为count的颜色即可

非常强大的功能 并有注释 #include <windows h> #include <math h> #include <conio h> #include <stdio h> #include <stdlib h> #include <string h> #include <time h> time t函数 头文件 struct Student { char name[20]; 姓名 char gender[20]; 性别 char tel[20]; 电话 char email[50]; 邮箱 char address[100]; 地址 }; typedef struct Student SS; 给struct Student赋别名 void login ; 登入模块 void display menu ; 主菜单 void showMenu ; 汇总统计菜单 void system menu SS student int length ; 菜单选择 int inputInfo SS student int length ; 输入信息 int check char string ; "ESC"判断函数 void print SS find[] int i ; 根据"i"输出特定成员信息 void outputInfo SS student int length ; 输出信息 int queryInfo SS find int length ; 查询信息 void queryOutput SS find int index ; void queryOutputInfo SS find int i ; void statistic SS student int length ; 汇总统计选择 void singel output SS student int length ; 输出部分学生信息 int read save SS student int length ; 读取 写入 文件 void read SS student int length ; 读取文件 void save SS student int length ; 保存文件 void copy File SS student int length ; 备份文件 void save time ; 保存登入时间 void CursorPosition int x int y ; 设置光标位置 void show welcome ; 显示欢迎使用系统页面 void log info char name[] int n ; 记录操作日志 name 用户名 n 操作方式 void Date operate ; 查看操作日志 void user ; 用户信息模块 void change pw ; 更改密码 void register control ; 注册控制 void source take ; 资源占用 void log out ; int changed length 0; 总共录入多少人 int N 1001; 数组的局限之处 数组在分配空间的时候需要常量来计算 不能确定大小不能分配所需空间大小 char show time[30]; 时间存放字符数组 int first 1; 是否刚刚登入系统 1 代表是 int flag read 0; 是否已从文件读入信息 0 代表不是">非常强大的功能 并有注释 #include <windows h> #include <math h> #include <conio h> #include <stdio h> #includ
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值