made ui look pretty
This commit is contained in:
parent
21359e5aaf
commit
56c816b10a
9 changed files with 78 additions and 54 deletions
|
@ -40,8 +40,12 @@
|
||||||
<activity
|
<activity
|
||||||
android:name=".AdminWelcome"
|
android:name=".AdminWelcome"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
<activity android:name=".UsersList" />
|
<activity
|
||||||
<activity android:name=".ServicesList"></activity>
|
android:name=".UsersList"
|
||||||
|
android:label="List of Users"/>
|
||||||
|
<activity
|
||||||
|
android:name=".ServicesList"
|
||||||
|
android:label="List of Services"></activity>
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
|
@ -17,14 +17,12 @@ public class UsersList extends AppCompatActivity {
|
||||||
|
|
||||||
DBHelper dbHelper = new DBHelper(this);
|
DBHelper dbHelper = new DBHelper(this);
|
||||||
List<String[]> users = dbHelper.getAllUsers();
|
List<String[]> users = dbHelper.getAllUsers();
|
||||||
String[] usernames = new String[(users.size()+1)*2];
|
String[] usernames = new String[(users.size())*2];
|
||||||
usernames[0] = "Username";
|
|
||||||
usernames[1] = "User Type";
|
|
||||||
Iterator iter = users.iterator();
|
Iterator iter = users.iterator();
|
||||||
for (int i=0; i<users.size();i++){
|
for (int i=0; i<users.size();i++){
|
||||||
String[] current = (String[])iter.next();
|
String[] current = (String[])iter.next();
|
||||||
usernames[(i+1)*2] = current[0];
|
usernames[(i)*2] = current[0];
|
||||||
usernames[(i+1)*2+1] = current[3];
|
usernames[(i)*2+1] = current[3];
|
||||||
}
|
}
|
||||||
ArrayAdapter adapter = new ArrayAdapter<String>(this, R.layout.simple_list_item_1_customized, usernames);
|
ArrayAdapter adapter = new ArrayAdapter<String>(this, R.layout.simple_list_item_1_customized, usernames);
|
||||||
GridView gridView = findViewById(R.id.Users);
|
GridView gridView = findViewById(R.id.Users);
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/Users"
|
android:id="@+id/Users"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="60dp"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:onClick="goToUsers"
|
android:onClick="goToUsers"
|
||||||
android:text="List of Users"
|
android:text="List of Users"
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/Services"
|
android:id="@+id/Services"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="60dp"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:onClick="goToServices"
|
android:onClick="goToServices"
|
||||||
android:text="List of Services"
|
android:text="List of Services"
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/LogOut"
|
android:id="@+id/LogOut"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="60dp"
|
||||||
android:layout_marginTop="50dp"
|
android:layout_marginTop="50dp"
|
||||||
android:onClick="LogOut"
|
android:onClick="LogOut"
|
||||||
android:text="Logout"
|
android:text="Logout"
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/LogIn"
|
android:id="@+id/LogIn"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="60dp"
|
||||||
android:layout_marginTop="40dp"
|
android:layout_marginTop="40dp"
|
||||||
android:onClick="onClickLogIn"
|
android:onClick="onClickLogIn"
|
||||||
android:text="@string/login"
|
android:text="@string/login"
|
||||||
|
|
|
@ -17,29 +17,34 @@
|
||||||
android:id="@+id/Title"
|
android:id="@+id/Title"
|
||||||
android:layout_width="300dp"
|
android:layout_width="300dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="100dp"
|
android:layout_marginBottom="70dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/CompanyName"
|
android:text="@string/CompanyName"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="36sp"
|
android:textSize="36sp"
|
||||||
app:fontFamily="@font/julius_sans_one" />
|
app:fontFamily="@font/julius_sans_one"
|
||||||
|
android:layout_marginTop="30dp"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/SignUp"
|
android:id="@+id/SignUp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="70dp"
|
||||||
android:layout_marginBottom="50dp"
|
android:layout_marginBottom="35dp"
|
||||||
android:onClick="onClickSignUp"
|
android:onClick="onClickSignUp"
|
||||||
android:text="@string/signup"
|
android:text="@string/signup"
|
||||||
android:theme="@style/AppTheme.Button" />
|
android:theme="@style/AppTheme.Button"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/LogIn"
|
android:id="@+id/LogIn"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="70dp"
|
||||||
android:onClick="onClickLogIn"
|
android:onClick="onClickLogIn"
|
||||||
android:text="@string/login"
|
android:text="@string/login"
|
||||||
android:theme="@style/AppTheme.Button" />
|
android:theme="@style/AppTheme.Button"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -12,18 +12,6 @@
|
||||||
android:paddingTop="@dimen/activity_vertical_margin"
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
android:background="@drawable/background"
|
android:background="@drawable/background"
|
||||||
tools:context=".ServicesList">
|
tools:context=".ServicesList">
|
||||||
<TextView
|
|
||||||
android:id="@+id/Welcome"
|
|
||||||
android:layout_width="300dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="20dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="List of Services"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
app:fontFamily="@font/julius_sans_one" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -64,7 +52,7 @@
|
||||||
android:id="@+id/Services"
|
android:id="@+id/Services"
|
||||||
android:scrollbars="vertical"
|
android:scrollbars="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="250dp"/>
|
android:layout_height="300dp"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<TextView
|
<TextView
|
||||||
|
|
|
@ -12,31 +12,54 @@
|
||||||
android:paddingTop="@dimen/activity_vertical_margin"
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
android:background="@drawable/background"
|
android:background="@drawable/background"
|
||||||
tools:context=".Welcome">
|
tools:context=".Welcome">
|
||||||
<TextView
|
|
||||||
android:id="@+id/Welcome"
|
|
||||||
android:layout_width="300dp"
|
|
||||||
android:layout_height="80dp"
|
|
||||||
android:layout_marginBottom="20dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="List of Users"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
app:fontFamily="@font/julius_sans_one" />
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="vertical">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_marginBottom="10dp">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/Title1"
|
||||||
|
android:layout_width="300dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="Username"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:gravity="center"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/Title2"
|
||||||
|
android:layout_width="300dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="User Type"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:gravity="center"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<GridView
|
<GridView
|
||||||
android:id="@+id/Users"
|
android:id="@+id/Users"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="450dp"
|
||||||
android:numColumns="2"
|
android:numColumns="2"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp"
|
||||||
|
|
||||||
|
/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:background="@drawable/customborder"
|
android:background="@color/colorWhite"
|
||||||
android:layout_marginBottom="5dp">
|
android:layout_marginBottom="5dp">
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,10 +14,11 @@
|
||||||
android:id="@+id/Name"
|
android:id="@+id/Name"
|
||||||
android:layout_width="80dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="0.5"
|
||||||
android:text=""
|
android:text=""
|
||||||
android:textColor="@color/colorWhite"
|
android:textColor="@color/colorBlack"
|
||||||
android:textSize="15sp"/>
|
android:textSize="15sp"
|
||||||
|
/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/Rate"
|
android:id="@+id/Rate"
|
||||||
|
@ -28,6 +29,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text=""
|
android:text=""
|
||||||
android:textColor="@color/colorWhite"
|
android:textColor="@color/colorBlack"
|
||||||
android:textSize="15sp"/>
|
android:textSize="15sp"
|
||||||
|
android:gravity="center"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -8,8 +8,12 @@
|
||||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
||||||
android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
|
android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
|
||||||
android:paddingRight="?android:attr/listPreferredItemPaddingRight"
|
android:paddingRight="?android:attr/listPreferredItemPaddingRight"
|
||||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
android:paddingStart="30dp"
|
||||||
android:textAppearance="?android:attr/textAppearanceListItemSmall"
|
android:textAppearance="?android:attr/textAppearanceListItemSmall"
|
||||||
android:textColor="@android:color/white">
|
android:textColor="@android:color/black"
|
||||||
|
android:background="@color/colorWhite"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
|
||||||
|
>
|
||||||
|
|
||||||
</TextView>
|
</TextView>
|
Loading…
Reference in a new issue