Android记事本开发之界面设计

不得不提一下ADT自带的手机截屏很方便,就在DDMS里可以找到。

main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
<ListView  android:id="@android:id/android:list"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    />
</LinearLayout>

newdiary.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"
    android:orientation="vertical" >

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="2dip"
        android:text="@string/new_Title"
        android:textColor="#FFFF00" />

    <EditText
        android:id="@+id/text_title"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="2dip" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="2dip"
        android:text="@string/new_Body"
        android:textColor="#FFFF00" />

    <EditText
        android:id="@+id/text_body"
        android:layout_width="fill_parent"
        android:layout_height="250dip"
        android:layout_marginBottom="2dip"
        android:gravity="top" />

    <RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >

        <Button
            android:id="@+id/new_save"
            android:layout_width="80dip"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:layout_marginLeft="50dp"
            android:text="@string/new_saveButton"
            android:textSize="20dip" />

        <Button
            android:id="@+id/new_cancel"
            android:layout_width="80dip"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_marginLeft="50dp"
            android:layout_toRightOf="@+id/new_save"
            android:text="@string/new_cancelButton"
            android:textSize="20dip" />
    </RelativeLayout>

</LinearLayout>

show_single_diary.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@color/transparent"
    android:orientation="vertical" >

    <TextView
        android:id="@+id/simple_text_title"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:textColor="@color/red"
        android:textSize="20sp" />

    <TextView
        android:id="@+id/simple_text_id"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="left"
        android:textColor="@color/LightSlateGray" />

    <TextView
        android:id="@+id/simple_text_time"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="right"
        android:layout_marginBottom="1dip"
        android:textColor="@color/LightSlateGray" />

    <ScrollView
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" >

        <TextView
            android:id="@+id/simple_text_body"
            android:layout_width="fill_parent"
            android:layout_height="250dip"
            android:layout_marginBottom="2dip"
            android:gravity="top"
            android:padding="1dip"
            android:textColor="@color/yellow"
            android:textSize="25sp" />
    </ScrollView>

</LinearLayout>

diary_item.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:orientation="vertical">

  <RelativeLayout android:orientation="horizontal"
  android:layout_width="fill_parent"
  android:layout_height="match_parent">
   <TextView android:id="@+id/item_id"
             android:layout_width="20dip"
             android:layout_height="wrap_content"
             android:gravity="center"
             android:visibility="gone"
             android:textColor="@color/red"
             android:layout_alignParentLeft="true"
  />
   <TextView android:id="@+id/item_title"
             android:layout_width="100dip"
             android:layout_height="wrap_content"
             android:textSize="20sp"
             android:padding="1dip"
             android:layout_margin="1dip"
             android:gravity="center"
             android:textColor="@color/red"
             android:layout_alignParentLeft="true"
             android:maxLines="1"
  />

   <TextView android:id="@+id/item_time"
             android:textSize="14sp"
             android:layout_margin="1dip"
             android:padding="3dip"
             android:textColor="@color/meadow_green"
             android:layout_width="80dip"
             android:gravity="center"
              android:layout_alignParentRight="true"
             android:layout_height="wrap_content"
             android:maxLines="1"
  />
  </RelativeLayout>
   <TextView android:id="@+id/item_preRead"
             android:textSize="14sp"
             android:textColor="@color/LightSlateGray"
             android:layout_marginTop="2dip"
             android:padding="1dip"
             android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:maxLines="1"
             android:paddingLeft="3dip"
             android:paddingRight="10dip"
  />
</LinearLayout>
时间: 2024-07-31 14:43:04

Android记事本开发之界面设计的相关文章

java-web开发,jsp界面设计出错

问题描述 web开发,jsp界面设计出错 <%@ page language="java" pageEncoding="gbk"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+

移动交互设计浅析 Android 4.0应用界面设计

与 iOS 相比,Android 系统界面存在各种不协调,应用界面本身缺乏统一的规范.虽然 Android 的开放性为应用的自主发挥带来了最大的可能性,但如果系统本身能够提供标准的范例,也未必是一件坏事,毕竟许多应用并不一定需要独创的界面.从 Android 4.0 开始,系统界面在一致性上有了许多改善,那么 Android 应用的界面应该如何设计?如果你仔细观察 Google 近期的一系列应用上的设计,应该能发现在一些指导性的要点,而这些设计也正在被第三方应用采用. Android 应用不应该

Android 3.0蜂巢界面设计

蜂巢的设计比之后的版本有很大的改进,更为简洁美观,同时有利于应用程序的架构.界面一致性和兼容多分辨率,虽然3.0版本还没有对外开源,但是已经体现在地图.图书.G+.Google I/O.网页Gmail.Google搜索首页和电子市场等界面设计中. 在3.0之前,标题栏显示小号字体,没有任何操作.控件栏位置相当于ios的标题栏,但是其交互更为优秀.文字标题居左显示,留给右边更多的空间,可以显示1-3个按钮.文字标题可以整合返回按 钮或者主页按钮,简化了常见"返回"按钮,这对形成闭环操作非

Android仿微信主界面设计_Android

先来一张效果图 一.ActionBar的设计 首先是main.xml,先定义这些菜单,界面稍后在调整 <menu xmlns:android="http://schemas.android.com/apk/res/android" tools:context=".MainActivity"> <item android:id="@+id/action_search" android:actionViewClass="a

Android仿微信主界面设计

先来一张效果图 一.ActionBar的设计 首先是main.xml,先定义这些菜单,界面稍后在调整 <menu xmlns:android="http://schemas.android.com/apk/res/android" tools:context=".MainActivity"> <item android:id="@+id/action_search" android:actionViewClass="a

Android记事本开发

数据库实现部分          界面设计 package com.jk; import java.util.List; import android.app.AlertDialog; import android.app.ListActivity; import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListen

C#进行Visio二次开发之界面设计及架构设计

写C#进行Visio二次开发的系列文章有很多篇了,都是写一些经验总结和技术知识的分享,本文继续来探讨这方面开发的一些心得,主要介绍下WinForm界面的设计和Visio软件的架构设计.先看看我花了N个月的业余时间完成的软件概貌,然后大家一起讨论下相关的技术知识. 软件界面主要有菜单区.工具条区.图纸内容区.右边的管理区.状态条区等等,主要注意的是采用了ToolStripPanel来进行布局,然后并使用了有名的WeifenLuo.WinFormsUI.Docking.dll控件对图纸内容区.右边的

Android UI开发神兵利器之设计资源

UI设计资源推荐又来了,纯干货,不注水~ 各种背景资源图库 http://subtlepatterns.com/ ICON资源 https://www.iconfinder.com/ HOLO Color生成器 http://android-holo-colors.com/

寻找ASP.NET界面设计高手

问题描述 本人手头有一个好的ASP.NETB/S项目,需要找一名asp.net高手,尤其是界面设计部分做兼职.人在上海.有意请联系:qq:603600090msn:jingjet_1@hotmail.com 解决方案 解决方案二: sf解决方案三: 我给你看看界面哈哈韩版界面看起来挺舒服的解决方案四: 接分.解决方案五: BS的美工很重要吗?解决方案六: 开发做界面设计好的不多解决方案七: www.cchuatuo.comwww.cc-tcm.com/www.371fang.comtable,d