第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會有你想問的

Android引入布局相關(guān)問題(郭霖_第一行代碼第二版)

Android引入布局相關(guān)問題(郭霖_第一行代碼第二版)

慕仙7137624 2018-04-23 20:15:25
title.xml文件如下:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"? ? android:layout_width="match_parent"? ? android:layout_height="wrap_content"? ? android:background="@drawable/title_bg">? ? <Button? ? ? ? android:id="@+id/title_back"? ? ? ? android:layout_width="wrap_content"? ? ? ? android:layout_height="wrap_content"? ? ? ? android:layout_gravity="center"? ? ? ? android:layout_margin="5dp"? ? ? ? android:background="@drawable/back_bg"? ? ? ? android:text="Back"? ? ? ? android:textColor="#fff" />? ? <TextView? ? ? ? android:id="@+id/title_text"? ? ? ? android:layout_width="0dp"? ? ? ? android:layout_height="wrap_content"? ? ? ? android:layout_gravity="center"? ? ? ? android:layout_weight="1"? ? ? ? android:gravity="center"? ? ? ? android:text="Title Text"? ? ? ? android:textColor="#fff"? ? ? ? android:textSize="24sp" />? ? <Button? ? ? ? android:id="@+id/title_edit"? ? ? ? android:layout_width="wrap_content"? ? ? ? android:layout_height="wrap_content"? ? ? ? android:layout_gravity="center"? ? ? ? android:layout_margin="5dp"? ? ? ? android:background="@drawable/edit_bg"? ? ? ? android:text="Edit"? ? ? ? android:textColor="#fff" /></LinearLayout>activity_main.xml文件如下:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"? ? android:layout_width="match_parent"? ? android:layout_height="match_parent" >? ? <include layout="@layout/title" /></LinearLayout>MainActivity.java文件如下:package com.example.uicustomviews;import android.support.v7.app.ActionBar;import android.support.v7.app.AppCompatActivity;import android.os.Bundle;public class MainActivity extends AppCompatActivity {? ? @Override? ? protected void onCreate(Bundle savedInstanceState) {? ? ? ? super.onCreate(savedInstanceState);? ? ? ? setContentView(R.layout.activity_main);? ? ? ? ActionBar actionBar = getSupportActionBar();? ? ? ? if(actionBar != null){? ? ? ? ? ? actionBar.hide();? ? ? ? }? ? }}title_bg,back_bg,edit_bg分別為純灰,純黑,純黑的三張圖片。運(yùn)行結(jié)果如下:書中的運(yùn)行結(jié)果大概如下:本人覺得應(yīng)該是圖片的選擇出現(xiàn)了問題。那么問題來了,有大神可以提供一下那三張圖片或者講解一下可不可以在我選的圖片的基礎(chǔ)上裁剪一下即可?
查看完整描述
  • 1 回答
  • 0 關(guān)注
  • 1604 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號