我想创建一个登录页面(如facebook android app),其中EditText隐藏了用户ID和密码字段.页面上会显示一个徽标,该徽标会在上面激活一定距离并保持在新位置,然后会显示编辑字段.
这是我尝试过的东西.但是这里的徽标从页面底部开始,然后移动到页面顶部.我希望徽标从页面中间开始,然后稍微移动到新位置.
关于如何做到这一点的任何想法>?
main.xml中
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="116dp"
android:src="@drawable/ic_launcher" />
Run Code Online (Sandbox Code Playgroud)
RES /动画/ animationfile.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/linear_interpolator" >
<translate
android:duration="5000"
android:fromYDelta="50%p"
android:toYDelta="-50%p"
/>
</set>
Run Code Online (Sandbox Code Playgroud)
Main.java
Animation translatebu= AnimationUtils.loadAnimation(this, R.anim.animationfile);
// tv.setText("Some text view.");
img.startAnimation(translatebu);
Run Code Online (Sandbox Code Playgroud)
我在Xamarin中创建了一个Portable类库,并希望将它用于Android应用程序.我想HttpClient在这个PCL中使用.我已经Microsoft Http Client libraries从NuGet包管理器添加了.我现在可以看到.Net portable subset添加到我的参考资料中了.但不知怎的,我仍然无法使用HttpClient它,也没有在.Net便携式子集中显示.
另外,我Current profile的PCL是4.0-Profile 158.如果我将配置文件更改为4.5,Xamarin崩溃并且无法打开解决方案
谁能帮我这个?谢谢