Android 闹钟 开发过程记录(一)

本文记录了一位大三学生自学Android后,利用寒假时间开发闹钟小程序的过程。开发者模仿小米闹钟设计了界面,并重点介绍了闹钟设置界面的布局文件和部分代码,强调目前关注的是功能实现。
摘要由CSDN通过智能技术生成

首先,说明一下:本人大三,刚自学完android基础知识,利用寒假一个月左右的时间,开发了一个闹钟小程序,趁着开学,印象还很深,热情还未减,把过程整理记录下来。这样自己以后也好复习,或许还能帮到有需要的同学。好了,不废话了。先看一下闹钟几个界面(基本上是照着小米自带的闹钟做的界面)。

            


            


基本的界面就是这样的了。(开发中的控件都是用的系统自带的,包括一些图片也没有精心制作,我暂时关注的是功能实现,谅解)


闹钟设置界面的布局文件如下(由于许多同类控件布局差不多,就都抽取到一个style文件中了):

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/bg_color"
    android:padding="10dip" >

    <LinearLayout
        android:id="@+id/ll_alarm_clock_setting_flag"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:orientation="horizontal" >

        <Button
            android:id="@+id/btn_alarm_clock_setting_cancel"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="@string/btn_cancel" />

        <Button
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值