小编NaS*_*aSt的帖子

MVVMCross 绑定 - 如何更改对象的可见性

我需要学习如何绑定和更改元素的属性。

我应该通过单击按钮来更改元素的可见性

我有Hello.axml不同的元素。

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:local="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
<TextView
    android:textSize="16sp"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    local:MvxBind="Text Strings[VerificationPhoneText]" />
<TextView
    android:textSize="16sp"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    local:MvxBind="Text Variable01" />
<Button
    android:id="@+id/enterButton"
    android:layout_height="wrap_content"
    android:layout_width="wrap_content"
    local:MvxBind="Text Strings[EnterButton]; Click ClickCommand" />
<GestureOverlayView
    android:layout_height="284dp"
    android:layout_width="280dp"
    android:background="#FAFAFA"
    android:layout_marginLeft="40dp"
    android:layout_marginRight="40dp"
    android:layout_marginTop="114dp"
    local:MvxBind="Visibility Visibility(MyProperty)">
    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Hello World" />
    <ImageView
        android:src="@mipmap/ic_check_circle_black_48dp"
        android:layout_marginLeft="95dp"
        android:layout_marginRight="95dp"
        android:layout_marginTop="103dp" />
</GestureOverlayView>
Run Code Online (Sandbox Code Playgroud)

我已经安装了可见性插件:

PM> Install-Package MvvmCross.Plugin.Visibility -Version 5.6.3
Run Code Online (Sandbox Code Playgroud)

并编辑了我的HelloViewModel.cs

     using MvvmCross.Core.ViewModels;
     using System.Windows.Input;

namespace My.Project.Core.ViewModels
{
    public class HelloViewModel : BaseViewModel
    { …
Run Code Online (Sandbox Code Playgroud)

binding android xamarin.android mvvmcross

3
推荐指数
1
解决办法
2908
查看次数

用于安装 Android SDK 的 Ansible-playbook

如何使用ansible-playbook安装Android SDK?

我需要配置 Jenkins 安装 playbook 并让 Ansible 配置 Jenkins 以与 Android 集成

所以,我有 Vagrantfile:

# -*- mode: ruby -*-
# vi: set ft=ruby :

IP = "192.168.33.55"
VM_NAME = "jenkins"

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "geerlingguy/ubuntu1604" #target OS: Ubuntu 16.04
  config.ssh.insert_key = false
  config.vm.synced_folder ".", "/vagrant", disabled: true
  config.ssh.forward_agent = true

  config.vm.provider :virtualbox do |v|
    v.name = VM_NAME
    v.memory = 1024
    v.cpus = 2
    v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
    v.customize ["modifyvm", :id, "--ioapic", "on"]
  end

  config.vm.hostname …
Run Code Online (Sandbox Code Playgroud)

android jenkins vagrant android-sdk-tools ansible

1
推荐指数
1
解决办法
3370
查看次数