#!/bin/bash
#Script for adding users and groups
if [ $(getent group Coffee) ]; then
echo
else
sudo groupadd Coffee
fi
read -p "What is the new user's login ID? " username
read -s -p "What is the user's password? " password
echo
read -p "What is the new user's full name? " fullname
read -p "What is the new user's initial group? " intgroup
read -p "What is the new user's additional group? " addgroup
if [ $(getent group $intgroup) ]; then
echo
else
sudo groupadd $intgroup
fi
if [ $(getent group $addgroup) ]; then
echo
else
sudo groupadd $addgroup
fi
sudo useradd -m -G Coffee,$intgroup,$addgroup $username
if [ -z $password ]
then
echo -e "newpass\nnewpass" | sudo passwd $username
else
echo -e "$password\n$password" | sudo passwd $username
fi
有谁能帮我找到为什么这不会滚动的原因?在相对布局中,我有textViews,spinners和editTexts。我对android和xml很新,所以我不知道它为什么不滚动。
编辑:这是所要求的完整布局。
答案 0 :(得分:0)
根据您的代码,您不需要父线性布局。尝试删除它并使用scrollView作为父级。并且还将orientation和scrollbars属性移除到relativeLayout,您不需要它们。