|
|
@ -6,6 +6,7 @@ import androidx.activity.ComponentActivity |
|
|
|
import androidx.activity.compose.setContent |
|
|
|
import androidx.activity.compose.setContent |
|
|
|
import androidx.compose.foundation.Image |
|
|
|
import androidx.compose.foundation.Image |
|
|
|
import androidx.compose.foundation.border |
|
|
|
import androidx.compose.foundation.border |
|
|
|
|
|
|
|
import androidx.compose.foundation.clickable |
|
|
|
import androidx.compose.foundation.layout.* |
|
|
|
import androidx.compose.foundation.layout.* |
|
|
|
import androidx.compose.foundation.lazy.LazyColumn |
|
|
|
import androidx.compose.foundation.lazy.LazyColumn |
|
|
|
import androidx.compose.foundation.lazy.rememberLazyListState |
|
|
|
import androidx.compose.foundation.lazy.rememberLazyListState |
|
|
@ -25,6 +26,7 @@ import androidx.lifecycle.viewmodel.compose.viewModel |
|
|
|
import androidx.navigation.compose.NavHost |
|
|
|
import androidx.navigation.compose.NavHost |
|
|
|
import androidx.navigation.compose.composable |
|
|
|
import androidx.navigation.compose.composable |
|
|
|
import com.gyf.csams.R |
|
|
|
import com.gyf.csams.R |
|
|
|
|
|
|
|
import com.gyf.csams.activity.ui.ActivityDetailActivity |
|
|
|
import com.gyf.csams.association.model.* |
|
|
|
import com.gyf.csams.association.model.* |
|
|
|
import com.gyf.csams.uikit.* |
|
|
|
import com.gyf.csams.uikit.* |
|
|
|
import com.gyf.csams.uikit.theme.CSAMSTheme |
|
|
|
import com.gyf.csams.uikit.theme.CSAMSTheme |
|
|
@ -338,8 +340,12 @@ class AssociationActivity: ComponentActivity() { |
|
|
|
* |
|
|
|
* |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
private fun OngoingActivity(modifier: Modifier=Modifier){ |
|
|
|
private fun OngoingActivity(modifier: Modifier=Modifier,model:OngoingActViewModel= viewModel()){ |
|
|
|
Row(modifier = modifier,horizontalArrangement = Arrangement.Center) { |
|
|
|
val context= LocalContext.current |
|
|
|
|
|
|
|
val act by model.act.observeAsState() |
|
|
|
|
|
|
|
Row(modifier = modifier.clickable(onClick = { |
|
|
|
|
|
|
|
context.startActivity(Intent(context,ActivityDetailActivity::class.java)) |
|
|
|
|
|
|
|
}),horizontalArrangement = Arrangement.Center) { |
|
|
|
val weight=0.5F |
|
|
|
val weight=0.5F |
|
|
|
val spaceWeight=(1-0.5F)/2 |
|
|
|
val spaceWeight=(1-0.5F)/2 |
|
|
|
Spacer(modifier = Modifier.weight(spaceWeight)) |
|
|
|
Spacer(modifier = Modifier.weight(spaceWeight)) |
|
|
@ -384,7 +390,10 @@ class AssociationActivity: ComponentActivity() { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
private fun HistoryActivity(modifier: Modifier,historyActVo: HistoryActVo){ |
|
|
|
private fun HistoryActivity(modifier: Modifier,historyActVo: HistoryActVo){ |
|
|
|
Box(modifier=modifier,contentAlignment = Alignment.Center){ |
|
|
|
val context= LocalContext.current |
|
|
|
|
|
|
|
Box(modifier=modifier.clickable(onClick = { |
|
|
|
|
|
|
|
context.startActivity(Intent(context,ActivityDetailActivity::class.java)) |
|
|
|
|
|
|
|
}),contentAlignment = Alignment.Center){ |
|
|
|
Image(painter = painterResource(id = R.drawable.history_activity_border), |
|
|
|
Image(painter = painterResource(id = R.drawable.history_activity_border), |
|
|
|
contentDescription = null, |
|
|
|
contentDescription = null, |
|
|
|
modifier = Modifier.fillMaxSize()) |
|
|
|
modifier = Modifier.fillMaxSize()) |
|
|
|