|
|
|
@ -6,6 +6,7 @@ import androidx.activity.ComponentActivity |
|
|
|
|
import androidx.activity.compose.setContent |
|
|
|
|
import androidx.compose.foundation.Image |
|
|
|
|
import androidx.compose.foundation.border |
|
|
|
|
import androidx.compose.foundation.clickable |
|
|
|
|
import androidx.compose.foundation.layout.* |
|
|
|
|
import androidx.compose.foundation.lazy.LazyColumn |
|
|
|
|
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.composable |
|
|
|
|
import com.gyf.csams.R |
|
|
|
|
import com.gyf.csams.activity.ui.ActivityDetailActivity |
|
|
|
|
import com.gyf.csams.association.model.* |
|
|
|
|
import com.gyf.csams.uikit.* |
|
|
|
|
import com.gyf.csams.uikit.theme.CSAMSTheme |
|
|
|
@ -338,8 +340,12 @@ class AssociationActivity: ComponentActivity() { |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
@Composable |
|
|
|
|
private fun OngoingActivity(modifier: Modifier=Modifier){ |
|
|
|
|
Row(modifier = modifier,horizontalArrangement = Arrangement.Center) { |
|
|
|
|
private fun OngoingActivity(modifier: Modifier=Modifier,model:OngoingActViewModel= viewModel()){ |
|
|
|
|
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 spaceWeight=(1-0.5F)/2 |
|
|
|
|
Spacer(modifier = Modifier.weight(spaceWeight)) |
|
|
|
@ -384,7 +390,10 @@ class AssociationActivity: ComponentActivity() { |
|
|
|
|
*/ |
|
|
|
|
@Composable |
|
|
|
|
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), |
|
|
|
|
contentDescription = null, |
|
|
|
|
modifier = Modifier.fillMaxSize()) |
|
|
|
|