1、title布局文件如下:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<ImageView
android:layout_width="18px"
android:layout_height="18px"
android:src="@drawable/logo"
></ImageView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000"
android:textSize="14px"
android:text="@string/app_name"
></TextView>
</LinearLayout>

这是一个水平的LinearLayout布局,里面包含一个ImageView(显示图片)和一个TextView(显示文本).

2、LonginActivity实现类如下:女装品牌排行榜

public class LoginActivity extends BaseActivity{

private static String TAG="LoginActivity";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.login);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,
R.layout.title);
}

}风之境地 java-javascript

BaseActivity是自己写的一个基类。

更多相关文章

  1. 经典button布局
  2. android camera 布局分析
  3. 关于设置线性布局及其他布局的宽高
  4. Android Studio常见布局报错及解决方案
  5. 2011.08.26——— android ListView之多个item布局
  6. 初学Android,五大布局对象(六)
  7. Android UI设计的三种常见布局(LinearLayout、RelativeLayout、Fr

随机推荐

  1. go语言的25个关键字介绍
  2. golang如何获取目录下文件是否存在
  3. golang找不到package怎么办
  4. 使用GVM管理Go版本的方法介绍
  5. Go 为什么这么“快”
  6. Go语言中操作MySQL数据库的方法
  7. Go命令行参数及标准输入输出介绍
  8. 解决使用go get命令被墙的问题
  9. golang怎么搭一个网站
  10. go mod模块化介绍