Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update educ api #1

Merged
merged 46 commits into from
Feb 4, 2021
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
af718ba
search engine created
VitorAmrm Apr 21, 2020
6822e9d
add search option on drawer
VitorAmrm Apr 23, 2020
0261be5
search Engine implemented
VitorAmrm Apr 28, 2020
e81214f
Search engine working and Thread implementation fixed
VitorAmrm Apr 30, 2020
596b4fe
choose context for challenge implemented
VitorAmrm Jun 22, 2020
37e0903
create challenge fixed
VitorAmrm Jun 23, 2020
946a05a
delete and edit implemented
VitorAmrm Jun 24, 2020
52df755
logout and contact implemented
VitorAmrm Jun 24, 2020
8556c48
Challenge image with null imageUrl fixed
VitorAmrm Jun 24, 2020
78d4155
launcher icons added && null creator on CreateContext fixed
VitorAmrm Jun 26, 2020
85eb767
small error on ChooseContextOncreateChallenge listview fixed
VitorAmrm Jun 30, 2020
a75a606
issues in CreateContext and CreateChallenge Navigation fixed
VitorAmrm Aug 15, 2020
dcba31f
Criados os adaptadores para os componentes de listagem
NapoleaoHerculano Oct 25, 2020
d3c2a61
Excluindo imports não utilizados
NapoleaoHerculano Oct 25, 2020
9a32426
Criando objeto para paginação das requisições dos challenges
NapoleaoHerculano Oct 25, 2020
8f67719
Criando o objeto para paginação na requisição de contextos
NapoleaoHerculano Oct 25, 2020
c3c5adb
Criado objeto para tratamento no login
NapoleaoHerculano Oct 25, 2020
e7a59f3
Interfaces para comunicação com a API
NapoleaoHerculano Oct 25, 2020
5bd829e
Classes para tratamento do Token de acesso a API
NapoleaoHerculano Oct 25, 2020
8ff83eb
Configuracoes para acesso a API
NapoleaoHerculano Oct 25, 2020
5397d02
Mudanças nos modelos base
NapoleaoHerculano Oct 25, 2020
7e39469
Alterando modelos para criação de objetos
NapoleaoHerculano Oct 25, 2020
ea4c199
Adicionando construtor auxiliar
NapoleaoHerculano Oct 25, 2020
e63d3d7
Objeto utilizado para tratar o login do usuario
NapoleaoHerculano Oct 25, 2020
fe9c568
Criação da tela de sobre o aplicativo
NapoleaoHerculano Oct 25, 2020
5292a69
Alterações no tratamento dos contexts e challenges antes da requisicao
NapoleaoHerculano Oct 25, 2020
c02deaa
Alteração no modo como os challenges são listados
NapoleaoHerculano Oct 25, 2020
c3ab872
Alteração no modo como os contextos são listados
NapoleaoHerculano Oct 25, 2020
44a111d
Excluindo imports não utilizados
NapoleaoHerculano Oct 25, 2020
78b846e
Corrigindo modo em como as tabs são selecionadas e tratando saída da …
NapoleaoHerculano Oct 25, 2020
bb33133
Inserindo o tratamento de autenticação na tela de Login
NapoleaoHerculano Oct 25, 2020
bb9aa60
Corrigindo instanciação do FAB
NapoleaoHerculano Oct 25, 2020
983d5d7
Corrigindo a tela de cadastro do usuário
NapoleaoHerculano Oct 25, 2020
7d0506c
Criada a tela para exibir os challenges de um context
NapoleaoHerculano Oct 25, 2020
f984007
Adicionando novas fotos e botões utilizados no app
NapoleaoHerculano Oct 25, 2020
ca8f7ff
Mudança na cor da side_nav_bar
NapoleaoHerculano Oct 25, 2020
6c0da91
Várias correções na interface do aplicativo
NapoleaoHerculano Oct 25, 2020
6580d97
Atualização no menu da nav_drawer
NapoleaoHerculano Oct 25, 2020
018e80f
Pequenos ajustes nos textos
NapoleaoHerculano Oct 25, 2020
24b739d
Removendo anotações não utilizadas
NapoleaoHerculano Oct 25, 2020
7f9198d
Material design e outras libs utilizadas
NapoleaoHerculano Oct 25, 2020
db0cdf5
Implementando material design no Style
NapoleaoHerculano Oct 25, 2020
3445b7e
Mudança na cor de fundo do app
NapoleaoHerculano Oct 25, 2020
aff0319
Mudança no ícone
NapoleaoHerculano Oct 25, 2020
9c0ae57
Modificado o adaptador para listar os contexts
NapoleaoHerculano Oct 25, 2020
7795664
Manifest e outros arquivos
NapoleaoHerculano Oct 25, 2020
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
Prev Previous commit
Next Next commit
Corrigindo instanciação do FAB
  • Loading branch information
NapoleaoHerculano committed Oct 25, 2020
commit bb9aa6096be29d61360f36139e611b467e0bb85e
Original file line number Diff line number Diff line change
@@ -1,31 +1,21 @@
package br.ufpb.dcx.apps4society.educapimanager.view

import android.content.Intent
import android.os.Bundle
import android.util.Log
import android.view.Menu
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.Toolbar
import androidx.drawerlayout.widget.DrawerLayout
import androidx.fragment.app.Fragment
import androidx.navigation.NavController
import androidx.navigation.findNavController
import androidx.navigation.ui.AppBarConfiguration
import androidx.navigation.ui.navigateUp
import androidx.navigation.ui.setupActionBarWithNavController
import androidx.navigation.ui.setupWithNavController
import br.ufpb.dcx.apps4society.educapimanager.R
import br.ufpb.dcx.apps4society.educapimanager.view.ui.challenge.ChallengeFragment
import br.ufpb.dcx.apps4society.educapimanager.view.ui.challenge.CreateChallengeActivity
import br.ufpb.dcx.apps4society.educapimanager.view.ui.context.ContextFragment
import br.ufpb.dcx.apps4society.educapimanager.view.ui.context.CreateContextActivity
import com.google.android.material.floatingactionbutton.FloatingActionButton
import com.google.android.material.navigation.NavigationView
import com.google.android.material.snackbar.Snackbar


class NavDrawerActivity() : AppCompatActivity(), View.OnClickListener{
class NavDrawerActivity() : AppCompatActivity(){

private lateinit var appBarConfiguration : AppBarConfiguration
private lateinit var navController : NavController
Expand All @@ -50,13 +40,11 @@ class NavDrawerActivity() : AppCompatActivity(), View.OnClickListener{
// menu should be considered as top level destinations.
appBarConfiguration = AppBarConfiguration(
setOf(
R.id.nav_home, R.id.nav_contact, R.id.nav_logout, R.id.nav_about
R.id.nav_home, R.id.nav_contact, R.id.nav_about, R.id.nav_logout
), drawerLayout
)
setupActionBarWithNavController(navController, appBarConfiguration)
navView.setupWithNavController(navController)
var fab : FloatingActionButton = findViewById(R.id.fab)
fab.setOnClickListener(this)

}

Expand All @@ -71,41 +59,4 @@ class NavDrawerActivity() : AppCompatActivity(), View.OnClickListener{
return navController.navigateUp(appBarConfiguration) || super.onSupportNavigateUp()
}

override fun onClick(v: View?) {
Log.i(TAG,"CLICK")
when(v?.id){
R.id.fab -> when (navController.currentDestination){
navController.graph.findNode(R.id.nav_home) -> {
if(currentFragmentInHomeViewPage is ContextFragment){
Log.i(TAG,"CONTEXT")
val intent = Intent(applicationContext, CreateContextActivity::class.java)
startActivity(intent)
Log.i(TAG,"CONTEXT")
}else if(currentFragmentInHomeViewPage is ChallengeFragment){
Log.i(TAG,"CHALLENGE")
val intent = Intent(applicationContext, CreateChallengeActivity::class.java)
startActivity(intent)
Log.i(TAG,"CHALLENGE")
}else{
val intent = Intent(applicationContext, CreateContextActivity::class.java)
startActivity(intent)
Log.i(TAG,"CONTEXT")
}
}
}
}
}

companion object {
private var currentFragmentInHomeViewPage : Fragment? = null

fun OnChangeViewPagerFragment(hook : OnNavDrawerListener){
currentFragmentInHomeViewPage = hook.onChangeFragment()
}
}

interface OnNavDrawerListener{
fun onChangeFragment() : Fragment;
}

}