前言 第一个 Android 程序,应该有些纪念的意义吧~ 主页面布局 给 Button 添加响应函数:android:onClick="login" public void login(View view) { String name; String password; EditText getname = (EditText)findViewById(R.id.editText); EditText getpassword = (EditText)findViewById(R.id…
布局: 线性布局+相对布局 日志打印: 利用LogCat和System.out.println打印观察. Onclick事件是采用过的第四种: 在配置文件中给Button添加点击时间 涉及知识: 通过上线文context获得文件的路径和缓存路径,保存文件 布局代码: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.an…
实现登陆页面并跳转和简单的注册页面   首先我们来看看布局的xml代码 login.xml <span style="font-family:Arial;font-size:18px;"><?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android&…
原文:http://blog.csdn.net/jkingcl/article/details/10989773       今天我们主要来介绍登陆页面的实现,主要讲解的就是涉及到的布局,以及简单的跳转需要用到的代码.   首先我们来看看布局的xml代码 login.xml <span style="font-family:Arial;font-size:18px;"><?xml version="1.0" encoding="utf-8…
最近写了个简单的登陆程序,有几点收获: 1.懂得如何在LinearLayout中嵌套LinearLayout,完善布局的行列: 2.用android:layout_weight控制控件的比重: 3.用getText()获取EditText内容: 4.熟悉控件的编写,不用再照着书抄写了=.= 代码如下: LoginActivity.java import android.os.Bundle; import android.app.Activity; import android.content.I…
AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hanqi.test3"> <application android:allowBackup="true&q…
这一节我们来看看登陆页面如何布局.对于刚接触到Android开发的童鞋来说.Android的布局感觉比較棘手.须要结合各种属性进行设置,接下来我们由点入面来 了解安卓中页面如何布局,登陆页面非常easy,两个文本框和一个button,页面效果例如以下: 1.布局代码 点击activity_mail.xml能够查看布局代码 点击graphical Layout切换到设计窗口 所有代码 <LinearLayout xmlns:android="http://schemas.android.co…
做一个简单的登陆页面 import tkinter wuya = tkinter.Tk() wuya.title("wuya") wuya.geometry("900x380+300+150") # add image pic = r'/Users/ydj/Desktop/未命名文件夹/bg.gif' canvas = tkinter.Canvas(wuya) image_file = tkinter.PhotoImage(file=pic) image = can…
做一个简单的登陆页面 import tkinter wuya = tkinter.Tk() wuya.title("wuya") wuya.geometry("900x380+300+150") # add image pic = r'/Users/ydj/Desktop/未命名文件夹/bg.gif' canvas = tkinter.Canvas(wuya) image_file = tkinter.PhotoImage(file=pic) image = can…
通过第一篇的解说,我们已经看到了怎样使用Intent来启动新的应用程序组件,可是实际上他们也能够使用sendBroadcast方法来在组件间匿名的广播消息. 作为一个系统级别的消息传递机制,Intent能够在进程之间发送结构化的消息. 因此,通过实现Broadcast Receiver来监听和响应应用程序内的这些Broadcast Intent. 通过使用Intent来广播一个事件,能够在不改动原始的应用程序的情况下.让我们开发者对事件做出反应.Android大量使用了Broadcast Rec…