Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
android:supportsRtl="true"
android:theme="@style/Theme.Project1"
android:usesCleartextTraffic="true"
tools:targetApi="31">
tools:targetApi="31"
android:enableOnBackInvokedCallback="true">
<activity
android:name=".InsitutionsActivity2"
android:exported="false" />

<activity
android:name=".SplashScreenActivity"
Expand Down
13 changes: 11 additions & 2 deletions app/src/main/java/com/example/project1/DashboardActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@ import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.Button
import android.widget.ImageView
import android.widget.TextView

class DashboardActivity : AppCompatActivity() {

private lateinit var BtnLogout: Button
private lateinit var institution: ImageView
lateinit var BtnLogout: Button
lateinit var toDoButton: Button


override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_dashboard)
Expand All @@ -26,8 +31,13 @@ class DashboardActivity : AppCompatActivity() {
startActivity(intent)
}

institution=findViewById(R.id.image_view1)
institution.setOnClickListener {
val intent = Intent(this, InsitutionsActivity2::class.java)
startActivity(intent)
}

BtnLogout=findViewById(R.id.btn_logout)
BtnLogout=findViewById(R.id.btn_logout)
BtnLogout.setOnClickListener {
val intent = Intent(this, LoginActvity::class.java)
startActivity(intent)
Expand All @@ -37,6 +47,5 @@ class DashboardActivity : AppCompatActivity() {




}
}
90 changes: 90 additions & 0 deletions app/src/main/java/com/example/project1/InsitutionsActivity2.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
package com.example.project1

import android.content.Intent
import android.graphics.Color
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.text.method.LinkMovementMethod
import android.widget.TextView
import android.widget.Button

class InsitutionsActivity2 : AppCompatActivity() {
private lateinit var BtnLogout: Button
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_insitutions2)
setupHyperlink()
}
fun setupHyperlink() {
val linkTextView = findViewById<TextView>(R.id.uj)
linkTextView.setMovementMethod(LinkMovementMethod.getInstance());
linkTextView.setLinkTextColor(Color.BLUE)

val unizulu = findViewById<TextView>(R.id.unizulu)
unizulu.setMovementMethod(LinkMovementMethod.getInstance());
unizulu.setLinkTextColor(Color.BLUE)

val wits = findViewById<TextView>(R.id.wits)
wits.setMovementMethod(LinkMovementMethod.getInstance());
wits.setLinkTextColor(Color.BLUE)

val tut = findViewById<TextView>(R.id.tut)
tut.setMovementMethod(LinkMovementMethod.getInstance());
tut.setLinkTextColor(Color.BLUE)

val sbu = findViewById<TextView>(R.id.sbu)
sbu.setMovementMethod(LinkMovementMethod.getInstance());
sbu.setLinkTextColor(Color.BLUE)

val ul = findViewById<TextView>(R.id.ul)
ul.setMovementMethod(LinkMovementMethod.getInstance());
ul.setLinkTextColor(Color.BLUE)

val uwc = findViewById<TextView>(R.id.uwc)
uwc.setMovementMethod(LinkMovementMethod.getInstance());
uwc.setLinkTextColor(Color.BLUE)

val nwu = findViewById<TextView>(R.id.nwu)
nwu.setMovementMethod(LinkMovementMethod.getInstance());
nwu.setLinkTextColor(Color.BLUE)

val unisa= findViewById<TextView>(R.id.unisa)
unisa.setMovementMethod(LinkMovementMethod.getInstance());
unisa.setLinkTextColor(Color.BLUE)

val uct = findViewById<TextView>(R.id.uct)
uct.setMovementMethod(LinkMovementMethod.getInstance());
uct.setLinkTextColor(Color.BLUE)

val ru = findViewById<TextView>(R.id.ru)
ru.setMovementMethod(LinkMovementMethod.getInstance());
ru.setLinkTextColor(Color.BLUE)

val up = findViewById<TextView>(R.id.up)
up.setMovementMethod(LinkMovementMethod.getInstance());
up.setLinkTextColor(Color.BLUE)

val ufs = findViewById<TextView>(R.id.ufs)
ufs.setMovementMethod(LinkMovementMethod.getInstance());
ufs.setLinkTextColor(Color.BLUE)

val nmmu = findViewById<TextView>(R.id.nmmu)
nmmu.setMovementMethod(LinkMovementMethod.getInstance());
nmmu.setLinkTextColor(Color.BLUE)

val cput = findViewById<TextView>(R.id.cput)
cput.setMovementMethod(LinkMovementMethod.getInstance());
cput.setLinkTextColor(Color.BLUE)

val ukzn = findViewById<TextView>(R.id.ukzn)
ukzn.setMovementMethod(LinkMovementMethod.getInstance());
ukzn.setLinkTextColor(Color.BLUE)

BtnLogout=findViewById(R.id.btn_logout)
BtnLogout.setOnClickListener {
val intent = Intent(this, DashboardActivity::class.java)
startActivity(intent)
}

}
}
Loading