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. android中怎么获得所有应用程序的快捷方式
  2. Android选项卡(TabWidget)应用
  3. SeekBar自定义
  4. Android中使用全屏
  5. Failed to fetch URL https://dl-ssl.google.com/android/reposi
  6. Android(安卓)Studio下“Error:Could not find com.android.tool
  7. Android隐藏标题栏,全屏显示
  8. Android:unable to start service Intent {act = com.android.ema
  9. Android(安卓)Notification使用

随机推荐

  1. android 里面资源应用 Drawable
  2. win10下使用Fiddler进行网络抓包
  3. android批量安装APK
  4. Dalvik虚拟机JNI方法的注册过程分析
  5. android listview 嵌套ListView,子lv高度
  6. 我的太鼓达人iPhone(未启动)
  7. 对iOS APP视觉设计师的一些不成熟的小建
  8. Android学习笔记(第一篇)编写第一个程序H
  9. 从罗马帝国精英军团/秦帝国军制谈iOS/And
  10. android开发动态页面时常用的LayoutInfla