-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1749 from zglx/master
- Loading branch information
Showing
11 changed files
with
308 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
123 changes: 116 additions & 7 deletions
123
soft1614080902231/app/src/main/res/layout/activity_sec.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,124 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical" | ||
> | ||
<LinearLayout | ||
android:id="@+id/mToplayout" | ||
android:layout_width="match_parent" | ||
android:layout_height="50dp" | ||
android:background="@android:color/white" | ||
android:orientation="horizontal" | ||
> | ||
<TextView | ||
android:id="@+id/china" | ||
android:layout_width="86dp" | ||
android:layout_height="42dp" | ||
android:text="中超" | ||
android:gravity="center" | ||
android:textColor="#666666" /> | ||
<TextView | ||
android:id="@+id/england" | ||
android:layout_width="86dp" | ||
android:layout_height="42dp" | ||
android:text="英超" | ||
android:gravity="center" | ||
android:textColor="#666666" /> | ||
<TextView | ||
android:id="@+id/spanish" | ||
android:layout_width="86dp" | ||
android:layout_height="42dp" | ||
android:text="西甲" | ||
android:gravity="center" | ||
android:textColor="#666666" /> | ||
<TextView | ||
android:id="@+id/NBA" | ||
android:layout_width="86dp" | ||
android:layout_height="42dp" | ||
android:text="NBA" | ||
android:gravity="center" | ||
android:textColor="#666666" /> | ||
<SearchView | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" /> | ||
</LinearLayout> | ||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:layout_marginTop="50dp" | ||
android:background="@android:color/white" | ||
android:orientation="vertical"> | ||
|
||
<TextView | ||
android:layout_width="fill_parent" | ||
android:layout_height="283dp" | ||
android:text="这是第二页" | ||
/> | ||
<ListView | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:footerDividersEnabled="false" | ||
android:headerDividersEnabled="false" /> | ||
<FrameLayout | ||
android:id="@+id/mBodylayout" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:background="@android:color/white" /> | ||
</LinearLayout> | ||
<LinearLayout | ||
android:id="@+id/mBottomLayout" | ||
android:layout_width="match_parent" | ||
android:layout_height="55dp" | ||
android:layout_alignParentBottom="true" | ||
android:background="#F2F2F2" | ||
android:orientation="horizontal"> | ||
|
||
</android.support.design.widget.CoordinatorLayout> | ||
<RelativeLayout | ||
android:id="@+id/mCharacter" | ||
android:layout_width="0dp" | ||
android:layout_height="55dp" | ||
android:layout_weight="1"> | ||
|
||
<TextView | ||
android:id="@+id/tv_character" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:layout_alignParentTop="true" | ||
android:gravity="center" | ||
android:singleLine="true" | ||
android:text="文字直播" | ||
android:textColor="#666666" | ||
android:textSize="14sp" /> | ||
<ImageView | ||
android:id="@+id/iv_wenzi" | ||
android:layout_width="54dp" | ||
android:layout_height="match_parent" | ||
android:layout_alignParentBottom="true" | ||
|
||
android:src="@drawable/ni" /> | ||
</RelativeLayout> | ||
<RelativeLayout | ||
android:id="@+id/mPlay" | ||
android:layout_width="0dp" | ||
android:layout_height="55dp" | ||
android:layout_weight="1"> | ||
<TextView | ||
android:id="@+id/tv_play" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:layout_alignParentBottom="true" | ||
android:layout_centerHorizontal="true" | ||
android:layout_marginBottom="3dp" | ||
android:gravity="center" | ||
android:singleLine="true" | ||
android:text="精彩回放" | ||
android:textColor="#666666" | ||
android:textSize="14sp" /> | ||
|
||
<ImageView | ||
android:id="@+id/iv_bofang" | ||
android:layout_width="54dp" | ||
android:layout_height="match_parent" | ||
android:layout_alignParentBottom="true" | ||
android:src="@drawable/nis" /> | ||
</RelativeLayout> | ||
</LinearLayout> | ||
</RelativeLayout> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
第四次实验 | ||
= | ||
一.实验目的 | ||
|
||
1.根据选题要求设计界面布局及控件使用;<br> | ||
2.布局xml及界面控制操作代码提交并截图;<br> | ||
3.将应用运行结果截图。<br> | ||
|
||
二.实验要求 | ||
- | ||
1.使用一种布局方式,设计所选题目的界面:<br> | ||
2.通过控件ID获取界面对象,执行相关操作:<br> | ||
3.实现界面控件的事件处理,例如点击按钮:<br> | ||
三.实验步骤 | ||
|
||
1、布局选用RelativeLayout方式<br> | ||
2、分别嵌套LinerLayout、FrameLayout、RelativeLayout布局方式,布局界面的顶部栏、内容栏、底部栏<br> | ||
3、为各种控件、布局命名ID,方便在.Java文件中接收<br> | ||
4、编写.java文件,给控件添加监听,实现点击事件onClick(),点击事件为:清空点击控件状态,给点击控件新的状态,如切换颜色<br> | ||
|
||
四、实验截图 | ||
- | ||
 | ||
|
||
 | ||
|
||
 | ||
|
||
 | ||
|
||
五、实验体会 | ||
- | ||
这次实验,我是通学习书上有关的代码,了解了Android的布局,感觉在.java文件编写控件事件很难,发生错误时,APP会停止运行 |