求这个Android UI效果的实现.... androidui 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 整体做成类似于scrollview,由上半部分logo和下半部分窗体连接而成,最开始只显示最上面部分(默认的),开启线程scroll 问题是logo是一下子上去了还是有过程的,如果没有过程,那布局就应该能实现。 背景1------>A layout背景2------>B layout登陆框------>C layout把A.B.C三个layout覆盖在一起,默认B.C隐藏。当点击A 布局时隐藏A,展现B,同时展现C(给C写一个上拉的动画) 直接给你demo下面是布局文件,其中的图片自己加<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/login_bg" android:orientation="vertical" > <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:background="@drawable/logo11w" /> </RelativeLayout> <LinearLayout android:id="@+id/bottom" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:orientation="vertical" android:visibility="gone" > <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/app_name" android:textSize="16sp" /> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/app_name" android:textSize="16sp" /> </LinearLayout></LinearLayout>下面是代码package com.example.testjson;import android.app.Activity;import android.os.Bundle;import android.os.Handler;import android.os.Message;import android.view.Menu;import android.view.MenuItem;import android.view.View;import android.view.animation.Animation;import android.view.animation.TranslateAnimation;import android.widget.LinearLayout;public class MainActivity extends Activity { private LinearLayout bottom; private Animation mShowAction; private Handler mHandler=new Handler(){ public void handleMessage(android.os.Message msg) { bottom.setAnimation(mShowAction); bottom.setVisibility(View.VISIBLE); }; }; private Runnable r = new Runnable() { @Override public void run() { try { Thread.sleep(2000); Message msg=new Message(); mHandler.sendMessage(msg); } catch (Exception e) { e.printStackTrace(); } } }; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); bottom=(LinearLayout)findViewById(R.id.bottom); mShowAction = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 1.0f, Animation.RELATIVE_TO_SELF, 0.0f); mShowAction.setDuration(500); Thread t=new Thread(r); t.start(); }} 360如何做到ROOT后监控隐私行为 如何获得MediaPlayer播放时的实时音量大小? android 不能正常运行了 运行的时候就是debug状态 android错误,请高手解答! 拍照得到的数据如何转码?? android使用mediaRecorder录制视频问题 makefile文件中指令问题 NetBean7.4开发 android项目 遇到错误 求个二维码扫描的优化方法 关于Fragment的Context怎么获取 寻找思路,指点一下别人这效果怎么实现的 android源码编译出错
背景2------>B layout
登陆框------>C layout把A.B.C三个layout覆盖在一起,默认B.C隐藏。当点击A 布局时隐藏A,展现B,同时展现C(给C写一个上拉的动画)
下面是布局文件,其中的图片自己加
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/login_bg"
android:orientation="vertical" > <RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" > <ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/logo11w" />
</RelativeLayout> <LinearLayout
android:id="@+id/bottom"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
android:visibility="gone"
> <EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/app_name"
android:textSize="16sp"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/app_name"
android:textSize="16sp"
/>
</LinearLayout></LinearLayout>
下面是代码
package com.example.testjson;import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.TranslateAnimation;
import android.widget.LinearLayout;public class MainActivity extends Activity { private LinearLayout bottom;
private Animation mShowAction;
private Handler mHandler=new Handler(){
public void handleMessage(android.os.Message msg) {
bottom.setAnimation(mShowAction);
bottom.setVisibility(View.VISIBLE);
};
};
private Runnable r = new Runnable() {
@Override
public void run() {
try {
Thread.sleep(2000);
Message msg=new Message();
mHandler.sendMessage(msg);
} catch (Exception e) {
e.printStackTrace();
}
}
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
bottom=(LinearLayout)findViewById(R.id.bottom);
mShowAction = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f,
Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF,
1.0f, Animation.RELATIVE_TO_SELF, 0.0f);
mShowAction.setDuration(500);
Thread t=new Thread(r);
t.start();
}
}