@Override
public void onClick(View v) {
Uri uri = Uri.parse(href);
Intent intent = new Intent(Intent.ACTION_VIEW,
uri);
startActivity(intent);
}
});
}
header_ll.addView(coupon_home_ad_item);
}
lv.addHeaderView(headerView);// 通过listview的addHeaderView方法 将header添加到
// listview里面
// listview的测试数据
for (int i = 0; i < 20; i++) {
arrayList.add(i + " ------------- "
- System.currentTimeMillis());
}
ArrayAdapter adapter = new ArrayAdapter(this, R.layout.item,
R.id.textView1, arrayList);
lv.setAdapter(adapter);
}
}
xml代码:
《Android学习笔记总结+最新移动架构视频+大厂安卓面试真题+项目实战源码讲义》
【docs.qq.com/doc/DSkNLaERkbnFoS0ZF】 完整资料开源分享
activity_main.xml
<RelativeLayout xmlns:android=“http://schemas.android.com/apk/res/android”
xmlns:tools=“http://schemas.android.com/tools”
android:layout_width=“match_parent”
android:layout_height=“match_parent”
android:background="#f4f4f4"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=“com.baozi.bzhorizontalscrollview.MainActivity” >
<ListView
android:id="@+id/lv"
android:layout_width=“fill_parent”
android:layout_height=“fill_parent” >
item_home_header.xml
<?xml version="1.0" encoding="UTF-8"?><HorizontalScrollView xmlns:android=“http://schemas.android.com/apk/res/android”
xmlns:ptr=“http://schemas.android.com/apk/res-auto”
android:id="@+id/coupon_home_ad_hv"
android:layout_width=“fill_parent”
android:layout_height=“fill_parent”
android:orientation=“vertical”
android:scrollbars=“none” >
<LinearLayout
android:id="@+id/header_ll"
android:layout_width=“wrap_content”
android:layout_height=“wrap_content”
android:layout_marginBottom=“15dp”
android:background="#dddddd"
android:orientation=“horizontal” >
home_item.xml
<?xml version="1.0" encoding="UTF-8"?><FrameLayout xmlns:android=“http://schemas.android.com/apk/res/android”
xmlns:ptr=“http://schemas.android.com/apk/res-auto”
android:id="@+id/coupon_home_ad_ll"
android:layout_width=“wrap_content”
android:layout_height=“wrap_content”
android:layout_marginBottom=“10dp”
android:layout_marginLeft=“5dp”
android:layout_marginRight=“5dp”
android:layout_marginTop=“10dp”
android:gravity=“center”
android:orientation=“horizontal” >
<ImageView
android:id="@+id/coupon_ad_iv"
android:layout_width=“120dp”
android:layout_height=“90dp”
android:layout_margin=“4dp”
android:background="@drawable/ic_launcher"
android:scaleType=“centerCrop” />
<TextView
android:layout_width=“wrap_content”
android:layout_height=“wrap_content”
android:layout_gravity=“center”
android:text=“点我”
android:textColor="#000000"
android:textSize=“20sp” />
<View
android:layout_width=“1dp”
android:layout_height=“90dp”
android:background="#000000" />
步骤:
首先加载 header
headerView = LayoutInflater.from(this).inflate(R.layout.item_home_header,null);
header_ll = (LinearLayout)headerView.findViewById(R.id.header_ll);
最后
上面这些公司都是时下最受欢迎的互联网大厂,他们的职级、薪资、福利也都讲的差不多了,相信大家都是有梦想和野心的人,心里多少应该都有些想法。
也相信很多人也都在为即将到来的金九银十做准备,也有不少人的目标都是这些公司。
我这边有不少朋友都在这些厂工作,其中也有很多人担任过面试官,上面的资料也差不多都是从朋友那边打探来的。除了上面的信息,我这边还有这些大厂近年来的面试真题及解析,以及一些朋友出于兴趣和热爱一起整理的Android时下热门知识点的学习资料。
部分文件:
准备,也有不少人的目标都是这些公司。
我这边有不少朋友都在这些厂工作,其中也有很多人担任过面试官,上面的资料也差不多都是从朋友那边打探来的。除了上面的信息,我这边还有这些大厂近年来的面试真题及解析,以及一些朋友出于兴趣和热爱一起整理的Android时下热门知识点的学习资料。
部分文件:
[外链图片转存中…(img-zXdCD4Wa-1640918281705)]
[外链图片转存中…(img-wsapMhSi-1640918281706)]
[外链图片转存中…(img-eaM1iDA3-1640918281707)]