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