tablet licenses on supervisor's student list

parent e15898d1
......@@ -15,6 +15,11 @@
<item name="darkorange" type="color">#FFFF8800</item>
<item name="darkred" type="color">#cc0000</item>
<!-- Main Pictogram Web Colors -->
<item name="text_primary" type="color">#428bca</item>
<item name="text_warning" type="color">#8a6d3b</item>
<item name="text_danger" type="color">#a94442</item>
<integer-array name="androidcolors">
<item>@color/blue</item>
<item>@color/purple</item>
......
......@@ -7,6 +7,7 @@ import android.graphics.Color;
import android.graphics.Typeface;
import android.provider.ContactsContract;
import android.support.v4.content.ContextCompat;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
......@@ -64,23 +65,25 @@ public class CustomList extends ArrayAdapter<String>{
// Name
TextView txtTitle = (TextView) rowView.findViewById(R.id.loginStudentName);
// License
// License, except add student view
TextView licenseView = (TextView) rowView.findViewById(R.id.loginStudentLicense);
switch (licenses[position]) {
case "pro":
if(!name_surname[position].equals(getContext().getString(R.string.addStudent))){
if(licenses[position].equals("pro")) {
licenseView.setText(fa_certificate);
break;
case "b":
licenseView.setTextColor(getContext().getResources().getColor(R.color.text_primary));
}else if (licenses[position].equals("trial")) {
licenseView.setText(fa_flask);
break;
default:
licenseView.setTextColor(getContext().getResources().getColor(R.color.text_warning));
}else {
licenseView.setText(fa_exclamation_triangle);
licenseView.setTextColor(getContext().getResources().getColor(R.color.text_danger));
}
Typeface font = Typeface.createFromAsset( getContext().getAssets(), "fonts/fontawesome-webfont.ttf" );
licenseView.setTypeface(font);
}
Typeface font = Typeface.createFromAsset( getContext().getAssets(), "fonts/fontawesome-webfont.ttf" );
licenseView.setTypeface(font);
// Image
ImageView imageView = (ImageView) rowView.findViewById(R.id.loginStudentPhoto);
txtTitle.setText(name_surname[position]);
......
......@@ -8,8 +8,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="50dp"
android:layout_marginTop="50dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:orientation="vertical">
<FrameLayout
......@@ -34,6 +34,7 @@
android:layout_centerHorizontal="false"
android:layout_centerVertical="true"
android:layout_gravity="center" />
</FrameLayout>
<LinearLayout
......@@ -45,16 +46,16 @@
android:id="@+id/loginStudentLicense"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="1dp" />
android:layout_marginRight="2dp"
android:layout_marginTop="4dp"
android:textAppearance="@android:style/TextAppearance.Medium" />
<TextView
android:id="@+id/loginStudentName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_below="@+id/loginStudentPhoto"
android:layout_centerHorizontal="false"
android:layout_gravity="center"
android:layout_weight="1"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
......
......@@ -62,13 +62,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
......@@ -76,6 +69,13 @@
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
......@@ -121,17 +121,5 @@
<orderEntry type="library" exported="" name="play-services-ads-9.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-ads-lite-9.2.1" level="project" />
<orderEntry type="module" module-name="commonlibrary" exported="" />
<orderEntry type="library" exported="" name="android-android-24" level="project" />
<orderEntry type="library" exported="" name="okhttp-ws-2.3.0" level="project" />
<orderEntry type="library" exported="" name="socket.io-client-0.5.0" level="project" />
<orderEntry type="library" exported="" name="okhttp-2.3.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.0.0" level="project" />
<orderEntry type="library" exported="" name="okio-1.3.0" level="project" />
<orderEntry type="library" exported="" name="gson-2.3" level="project" />
<orderEntry type="library" exported="" name="engine.io-client-0.5.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-21.0.3" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="hamcrest-core-1.3" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="junit-4.12" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="json-20090211" level="project" />
</component>
</module>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment