기본 콘텐츠로 건너뛰기

안드로이드 앱 만들기 : 채팅창 만들어 보기 (Jetpack Compose 에 AndroidView Binding)


원본출처: 티스토리 바로가기

Compose을 활용한 앱을 구현하는 동안에 이전에 만들었던 layout 을 활용하고자 하는 경우가 생긴다면... Androind ViewBinding을 활용하는 방법이 있었다.

 

https://developer.android.com/jetpack/compose/interop/interop-apis?hl=ko 

 

상호 운용성 API  |  Jetpack Compose  |  Android Developers

상호 운용성 API 앱에 Compose를 채택하는 동안 Compose와 뷰 기반 UI를 결합할 수 있습니다. 다음에는 Compose로의 전환을 보다 쉽게 할 수 있는 API, 권장사항 및 팁이 나와 있습니다. Android 뷰의 Compose

developer.android.com

 

 

구현을 시작해 보면, 먼저 gradle 파일에 implementation 을 추가해야 한다. 

implementation "androidx.compose.ui:ui-viewbinding:$compose_version"

 다음은 채팅방 구현을 위해서 예전에 만들었던 코드에서 Recycleview 을 활용했던 layout을 가지고 왔다.

 

layout 예제

<?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     xmlns:tools="http://schemas.android.com/tools"     android:layout_width="match_parent"     android:layout_height="match_parent"     tools:context=".ChatRoomActivity">      <LinearLayout         android:id="@+id/linearLayout2"         android:layout_width="match_parent"         android:layout_height="60dp"         android:orientation="vertical"         android:weightSum="5"         app:layout_constraintStart_toStartOf="parent"         app:layout_constraintTop_toTopOf="parent">          <LinearLayout             android:layout_width="match_parent"             android:layout_height="0dp"             android:layout_weight="5"             android:orientation="horizontal"             android:weightSum="10">              <TextView                 android:id="@+id/textView11"                 android:layout_width="0dp"                 android:layout_height="match_parent"                 android:layout_weight="2"                 android:gravity="center_horizontal|center_vertical"                 android:text="현재시간" />              <TextClock                 android:id="@+id/textView10"                 android:layout_width="0dp"                 android:layout_height="match_parent"                 android:layout_weight="7"                 android:format12Hour="hh:mm"                 android:format24Hour="HH:mm"                 android:gravity="center_horizontal|center_vertical" />          </LinearLayout>      </LinearLayout>      <androidx.recyclerview.widget.RecyclerView         android:id="@+id/rv"         android:name="com.roopre.simpleboard.Fragment.ChatMsgFragment"         android:layout_width="match_parent"         android:layout_height="0dp"         android:layout_marginStart="8dp"         android:layout_marginEnd="8dp"         app:layoutManager="LinearLayoutManager"         app:layout_constraintBottom_toTopOf="@+id/linearLayout"         app:layout_constraintEnd_toEndOf="parent"         app:layout_constraintStart_toStartOf="parent"         app:layout_constraintTop_toBottomOf="@+id/linearLayout2"         tools:context=".Fragment.ChatMsgFragment"         tools:listitem="@layout/custom_chat_msg" />      <LinearLayout         android:id="@+id/linearLayout"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_marginStart="8dp"         android:layout_marginEnd="8dp"         android:layout_marginBottom="8dp"         android:orientation="horizontal"         app:layout_constraintBottom_toBottomOf="parent"         app:layout_constraintEnd_toEndOf="parent"         app:layout_constraintStart_toStartOf="parent">          <EditText             android:id="@+id/content_et"             android:layout_width="0dp"             android:layout_height="match_parent"             android:layout_weight="1"             android:background="@drawable/bg_content_et"             android:hint="메시지를 입력하세요."             android:lines="1"             android:maxLines="1"             android:padding="8dp" />          <ImageView             android:id="@+id/send_iv"             android:layout_width="40dp"             android:padding="2dp"             android:layout_height="wrap_content"             android:adjustViewBounds="true"             android:src="@drawable/ic_send" />      </LinearLayout>  </androidx.constraintlayout.widget.ConstraintLayout>

 

 

다음은 recycleview 에 들어갈 item layout은 다음과 같이 구현하였다. 

 

<?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     xmlns:tools="http://schemas.android.com/tools"     android:id="@+id/constraintLayout"     android:layout_width="match_parent"     android:layout_height="wrap_content">      <androidx.constraintlayout.widget.ConstraintLayout         android:id="@+id/other_cl"         android:layout_width="0dp"         android:layout_height="wrap_content"         app:layout_constraintBottom_toTopOf="@+id/my_cl"         app:layout_constraintEnd_toEndOf="parent"         app:layout_constraintStart_toStartOf="parent"         app:layout_constraintTop_toTopOf="parent">          <TextView             android:id="@+id/userid_tv"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_marginStart="16dp"             android:layout_marginTop="16dp"             android:text="userid_tv"             android:textSize="16sp"             android:textStyle="bold"             app:layout_constraintStart_toStartOf="parent"             app:layout_constraintTop_toTopOf="parent" />          <TextView             android:id="@+id/date_tv"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="date_tv"             android:textSize="10sp"             app:layout_constraintStart_toStartOf="@+id/userid_tv"             app:layout_constraintTop_toBottomOf="@+id/userid_tv" />          <TextView             android:id="@+id/content_tv"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_marginTop="8dp"             android:background="@drawable/bg_content_et"             android:padding="8dp"             android:text="content_tv"             android:textSize="12sp"             app:layout_constraintBottom_toBottomOf="parent"             app:layout_constraintStart_toStartOf="@+id/date_tv"             app:layout_constraintTop_toBottomOf="@+id/date_tv" />     </androidx.constraintlayout.widget.ConstraintLayout>      <androidx.constraintlayout.widget.ConstraintLayout         android:id="@+id/my_cl"         android:layout_width="0dp"         android:layout_height="wrap_content"         app:layout_constraintBottom_toBottomOf="parent"         app:layout_constraintEnd_toEndOf="parent"         app:layout_constraintHorizontal_bias="1.0"         app:layout_constraintStart_toStartOf="parent"         app:layout_constraintTop_toBottomOf="@+id/other_cl">          <TextView             android:id="@+id/userid_tv2"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_marginTop="20dp"             android:layout_marginEnd="16dp"             android:text="userid_tv"             android:textSize="16sp"             android:textStyle="bold"             app:layout_constraintEnd_toEndOf="parent"             app:layout_constraintTop_toTopOf="parent" />          <TextView             android:id="@+id/date_tv2"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_marginTop="4dp"             android:layout_marginEnd="16dp"             android:text="date_tv2"             android:textSize="10sp"             app:layout_constraintEnd_toEndOf="parent"             app:layout_constraintTop_toBottomOf="@+id/userid_tv2" />          <TextView             android:id="@+id/content_tv2"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_marginTop="8dp"             android:layout_marginEnd="16dp"             android:background="@drawable/bg_content_et"             android:padding="8dp"             android:text="content_tv2"             android:textSize="12sp"             app:layout_constraintBottom_toBottomOf="parent"             app:layout_constraintEnd_toEndOf="parent"             app:layout_constraintTop_toBottomOf="@+id/date_tv2"             app:layout_constraintVertical_bias="0.0" />     </androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout> 

 

그리고 Recycleview 에 데이터를 넣고 구현하기 위해서 adapter을 구현하였다. 

 

import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView;  import androidx.compose.runtime.snapshots.SnapshotStateList; import androidx.constraintlayout.widget.ConstraintLayout; import androidx.recyclerview.widget.RecyclerView; import com.billcoreatech.multichat416.R;  import org.jetbrains.annotations.NotNull;  import java.util.ArrayList;  public class ChatAdapter extends RecyclerView.Adapter<ChatAdapter.ViewHolder> {      private static final String TAG = "ChatAdapter";     private final ArrayList<ChatMessage> chatMsgModels;     String displayName ;      public ChatAdapter( ArrayList<ChatMessage> items, String displayName) {         this.chatMsgModels = items;         this.displayName = displayName;     }      @Override     public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {         View view = LayoutInflater.from(parent.getContext())                 .inflate(R.layout.custom_chat_msg, parent, false);         return new ViewHolder(view);     }      @Override     public void onBindViewHolder(final ViewHolder holder, int position) {          ChatMessage vo = chatMsgModels.get(position);         try {             Log.e(TAG, " userId=" + vo.getDisplayName()+ ": displayName=" + displayName) ;          } catch (Exception e) {          }         if (vo.getDisplayName().equals(displayName)) {             holder.other_cl.setVisibility(View.GONE);             holder.my_cl.setVisibility(View.VISIBLE);              holder.userid_tv2.setText(vo.getDisplayName());             holder.date_tv2.setText(vo.getCrtDtim());             holder.content_tv2.setText(vo.getContent());         }else         {             holder.other_cl.setVisibility(View.VISIBLE);             holder.my_cl.setVisibility(View.GONE);              holder.userid_tv.setText(vo.getDisplayName()); // userId 대신 nickName 으로 대체             holder.date_tv.setText(vo.getCrtDtim());             holder.content_tv.setText(vo.getContent());         }     }      @Override     public int getItemCount() {         return chatMsgModels.size();     }      public class ViewHolder extends RecyclerView.ViewHolder {         public ConstraintLayout my_cl, other_cl;         public TextView userid_tv, date_tv, content_tv, userid_tv2, date_tv2, content_tv2;          public ViewHolder(View view) {             super(view);             my_cl = view.findViewById(R.id.my_cl);             other_cl = view.findViewById(R.id.other_cl);             userid_tv = view.findViewById(R.id.userid_tv);             date_tv = view.findViewById(R.id.date_tv);             content_tv = view.findViewById(R.id.content_tv);             userid_tv2 = view.findViewById(R.id.userid_tv2);             date_tv2 = view.findViewById(R.id.date_tv2);             content_tv2 = view.findViewById(R.id.content_tv2);              // 2021.11.01 item 클릭 처리를 위해서 추가             itemView.setOnClickListener(new View.OnClickListener() {                 @Override public void onClick(View v) {                     int pos = getAdapterPosition() ;                     if (pos != RecyclerView.NO_POSITION) {                         // 리스너 객체의 메서드 호출.                         if (mListener != null) {                             mListener.onItemClick(v, pos) ;                         }                     }                 }             });         }     }      // 2021.11.01 리스너 객체 참조를 저장하는 변수     private OnItemClickListener mListener = null ;      // OnItemClickListener 리스너 객체 참조를 어댑터에 전달하는 메서드     public void setOnItemClickListener(OnItemClickListener listener) {         this.mListener = listener ;     }      public interface OnItemClickListener {         void onItemClick(View v, int position) ;     } }

 

다음은 데이터를 넣기 위한 구조체는 다음 처럼 구현을 하였다.

 

 data class ChatMessage(     var displayName:String = "",     var crtDtim:String = "",     var content:String = "" )

kotlin 으로 구현을 하면서 좋은 것은 source code 가 간소화된다는 것이다. java로 구현했다면 getter / setter을 다 넣어 주었어야 하겠지만, kotlin 으로 구현하다 보니 그럼 군더더기는 필요가 없게 되었다.

 

이번에는 채팅방 운영을 위한 activity code을 구현해 보았다.

 

import android.content.Intent import android.content.SharedPreferences import android.os.Bundle import android.util.Log import android.view.KeyEvent import android.view.KeyEvent.KEYCODE_ENTER import androidx.activity.ComponentActivity import androidx.activity.compose.setContent import androidx.activity.viewModels import androidx.compose.foundation.gestures.Orientation import androidx.compose.foundation.gestures.rememberScrollableState import androidx.compose.foundation.gestures.scrollable import androidx.compose.foundation.layout.* import androidx.compose.material.* import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Face import androidx.compose.material.icons.filled.Logout import androidx.compose.material.icons.filled.ManageAccounts import androidx.compose.runtime.* import androidx.compose.ui.Modifier import androidx.compose.ui.viewinterop.AndroidViewBinding import androidx.core.content.ContextCompat import com.billcoreatech.multichat416.databean.ChatAdapter import com.billcoreatech.multichat416.databean.ChatMessage import com.billcoreatech.multichat416.databean.ChatMessageViewModel import com.billcoreatech.multichat416.databinding.ActivityChatRoomBinding import com.billcoreatech.multichat416.ui.theme.MultiChat416Theme import com.google.firebase.auth.FirebaseAuth import com.google.firebase.auth.ktx.auth import com.google.firebase.database.ChildEventListener import com.google.firebase.database.DataSnapshot import com.google.firebase.database.DatabaseError import com.google.firebase.database.ktx.database import com.google.firebase.ktx.Firebase import java.text.SimpleDateFormat import java.util.* import kotlin.collections.ArrayList  class ChatRoomActivity : ComponentActivity() {      var TAG = "ChatRoomActivity"      lateinit var displayName:String     lateinit var auth: FirebaseAuth     lateinit var sp: SharedPreferences     lateinit var sdf:SimpleDateFormat     private val database = Firebase.database     private val chatMessages = database.getReference("ChatMessage")     lateinit var df:SimpleDateFormat     lateinit var chatId:String     lateinit var startDt:String     lateinit var adapter:ChatAdapter     var chatMesgItems = ArrayList<ChatMessage>()         private set     lateinit var binding:ActivityChatRoomBinding      override fun onCreate(savedInstanceState: Bundle?) {         super.onCreate(savedInstanceState)          auth = Firebase.auth         sp = getSharedPreferences("MultiChat", MODE_PRIVATE)         sdf = SimpleDateFormat("yyyyMMddHHmmss")         df = SimpleDateFormat("yyyy-MM-dd HH:mm:ss")         chatId = intent.getStringExtra("chatId") as String         startDt = intent.getSerializableExtra("startDt") as String         Log.e(TAG, "${startDt}")         displayName = auth.currentUser?.displayName.toString()          chatMesgItems.clear()         adapter = ChatAdapter(chatMesgItems, displayName)         binding = ActivityChatRoomBinding.inflate(layoutInflater)          setContent {             val isDarkTheme = remember { mutableStateOf(false) }             if(isDarkTheme.value){                 this.window.statusBarColor = ContextCompat.getColor(this, R.color.softBlack)             }else{                 this.window.statusBarColor = ContextCompat.getColor(this, R.color.softBlue)             }             MultiChat416Theme(darkTheme = isDarkTheme.value) {                 Scaffold(topBar = {                     ThemeAppBar(darkThemeState = isDarkTheme)                 }, modifier = Modifier.fillMaxSize()                 ) { innerPadding ->                     mainContent(Modifier.padding(innerPadding))                 }             }         }     }      @Composable     fun ThemeAppBar(darkThemeState: MutableState<Boolean>) {          TopAppBar(title = {             Row {                 Text(text = getString(R.string.app_name), modifier = Modifier.weight(8f))                 Switch(checked = darkThemeState.value, onCheckedChange = {                     darkThemeState.value = it                 }, modifier = Modifier.weight(2f))                 IconButton(onClick = {  }) {                     Icon(imageVector = Icons.Default.Face, contentDescription = "ChatRoom")                 }                 IconButton(onClick = { doProfile() }) {                     Icon(imageVector = Icons.Default.ManageAccounts, contentDescription = "Profile")                 }                 IconButton(onClick = { doLogOut() }) {                     Icon(imageVector = Icons.Default.Logout, contentDescription = "LogOut")                 }             }         })     }      private fun doProfile() {         var intent = Intent(this@ChatRoomActivity, SettingActivity::class.java)         startActivity(intent)     }      @Composable     fun mainContent(padding: Modifier) {         Box(             Modifier                 .fillMaxWidth()                 .fillMaxHeight()                 .scrollable(rememberScrollableState {                     // view world deltas should be reflected in compose world                     // components that participate in nested scrolling                     it                 }, Orientation.Vertical)         ) {                     // compose 에서 layout 을 binding 해서 사용하는 코드 구현...             AndroidViewBinding(ActivityChatRoomBinding::inflate) {                 var binding = this                 chatMessages.child(chatId).orderByChild("crtDtim").startAfter(startDt.toString())                     .addChildEventListener(object : ChildEventListener{                         override fun onChildAdded(snapshot: DataSnapshot, previousChildName: String?) {                             Log.e(TAG, "onChildAdded")                             var chatMessageItem = snapshot.getValue(ChatMessage::class.java)                             // 왜 2번씩 들어가는지 모르겠지만... 일단은 한번만 들어가게 하기 위해서                             if (chatMessageItem != null && chatMesgItems.indexOf(chatMessageItem) < 0) {                                 chatMesgItems.add(chatMessageItem)                             }                             binding.rv.adapter = adapter                             binding.rv.scrollToPosition(chatMesgItems.size - 1)                         }                          override fun onChildChanged(snapshot: DataSnapshot, previousChildName: String?) {                             Log.e(TAG, "onChildChanged")                         }                          override fun onChildRemoved(snapshot: DataSnapshot) {                             Log.e(TAG, "onChildRemoved")                         }                          override fun onChildMoved(snapshot: DataSnapshot, previousChildName: String?) {                             Log.e(TAG, "onChildMoved")                         }                          override fun onCancelled(error: DatabaseError) {                             Log.e(TAG, "onCancelled")                         }                      })                 this.sendIv.setOnClickListener {                     if (this.contentEt.text.length > 0) {                         var chatMessage = ChatMessage(displayName, df.format(GregorianCalendar.getInstance(TimeZone.getDefault()).timeInMillis),this.contentEt.text.toString() )                         chatMessages.child(chatId).push().setValue(chatMessage).addOnSuccessListener {                             Log.e(TAG, "push Success...")                         }.addOnFailureListener {                             Log.e(TAG, "push Failure...")                         }                     }                 }             }         }     }      private fun doLogOut() {         chatMessages.child(chatId).setValue(null)         finish()     } }

 

이렇게 구현을 해서 처리가 되기는 했지만, 아직 해소가 되지 않은 것은 내용을 입력 하면 realtime database에 기록이 되고, addChiledEventListener을 통해서 기록된 내용을 가져와서 recycleview에 표시를 하기 위해서 arryalist에 넣어 주는 구현을 하였는데, 입력은 1번인데 실제 표시는 2번씩 나오는 현상이 발생하였다.  아직 그 원인을 알지 못해 꼼수를 넣었다. arraylist에 이미 들어 있는 거면 넣지 않도록 하여 해소를 하였다.

 

구현된 화면 예시와 동작은 다음과 같이 처리가 되었다.

채팅방 예시

 

 

동영상 예시

 

이렇게 까지 구현을 하면 compose 로 화면을 구현하고 예전에 만들었던 layout 을 가져와서 활용하는 것도 구현을 해 보았다.

 

 

귤탐 당도선별 감귤 로열과, 3kg(S~M), 1박스 삼립 호빵 발효미종 단팥, 92g, 14개입 [엉클컴퍼니] 우리밀 찐빵/흑미찐빵/단호박찐빵/고구마찐빵 국산팥, 우리밀 고구마찐빵(20개입) 1300g 국산팥 우리밀 MORIT 여성용 방한장갑 터치스크린 다용도 고급겨울장갑 에이치머스 스마트폰 터치 방한 장갑
이 포스팅은 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다.

댓글

이 블로그의 인기 게시물

이번주 로또 당첨 번호을 알려 드립니다.

Good Lock !!! 참조 site 티스토리 ## 로또 번호 예측 분석 및 5개 조합 제안 (자세한 설명 포함) 제공하신 1147회차부터 1167회차까지의 로또 당첨 번호 데이터를 분석하여 다음 회차(1168회차)의 예상 번호 조합 5개를 제시합니다. 분석은 제시된 6가지 통계적 패턴을 기반으로 이루어지며, 각 패턴의 주기성과 이전 회차와의 비교를 통해 예측합니다. 마지막 10회차 당첨 번호와 중복되지 않는 조합을 우선적으로 제시합니다. **1. 분석 방법:** 각 회차의 당첨 번호 6개 (7개 중 마지막 숫자 제외)를 사용하여 다음과 같은 통계 분석을 수행합니다. * **연속 번호 간격:** 연속된 번호가 나타날 때 그 사이의 간격을 계산합니다. (예: 1, 2, 4의 경우 간격은 1, 2입니다.) * **홀짝 개수 및 간격:** 홀수와 짝수의 개수를 세고, 홀수와 짝수가 번갈아 나오는 간격을 계산합니다. * **총합 및 총합 간격:** 각 회차의 번호 총합을 계산하고, 같은 총합이 이전에 나타났던 회차까지의 간격을 구합니다. * **평균 및 평균 간격:** 각 회차의 번호 평균을 계산하고, 같은 평균이 이전에 나타났던 회차까지의 간격을 구합니다. * **일치율 및 일치율 간격:** 위 1~4번의 결과들을 종합하여 일치율을 계산하고, 같은 일치율이 이전에 나타났던 회차까지의 간격을 구합니다. (일치율 계산은 각 지표의 비율을 종합적으로 고려하는 방식으로, 단순한 수치 합산이 아닌, 전문적인 통계 기법이 필요할 수 있습니다. 이 예시에서는 간략화된 추세 분석 방식을 사용합니다.) **2. 데이터 분석 및 패턴 발견 (간략화):** 제공된 데이터의 양이 많지 않고, 복잡한 통계 기법을 적용하기에는 제한적이므로, 간략화된 추세 분석을 통해 주요 패턴을 파악합니다. 실제 분석에서는 더욱 정교한 통계 기법 (예: 시계열 분석, 마르코프 체인 등)을 적용해야 더 정확한 예측이 가능합니다. **3. 예상 번호 조합 제...

이번주 로또 당첨 번호을 알려 드립니다.

Good Lock !!! 참조 site 티스토리 ## 로또 분석 및 예상 번호 추천 (1167회차) 제공해주신 1146회부터 1166회차까지의 로또 당첨번호 데이터를 분석하여 1167회차 예상 번호를 제시합니다. 아래 분석은 제공된 데이터에 기반하며, 로또는 순전히 확률에 의존하는 게임이므로 예측의 정확성을 보장할 수 없습니다. **1. 분석 방법:** 제공하신 데이터를 바탕으로 다음과 같은 통계적 분석을 실시했습니다. * **연속 번호 간격:** 각 회차의 당첨 번호 6개 중 연속된 숫자의 개수와 간격을 계산했습니다. 예를 들어 {1, 3, 5, 6, 8, 10} 이라면 연속된 숫자는 {5, 6}이며 간격은 1입니다. 여러 구간이 존재할 경우 각 구간의 간격을 모두 계산합니다. * **홀짝 개수 및 간격:** 각 회차의 홀수와 짝수의 개수를 계산하고, 이들의 비율 변화를 분석했습니다. * **총합 및 평균:** 각 회차의 당첨 번호 총합과 평균을 계산하고, 동일한 총합 또는 평균이 나타난 회차 간의 간격을 분석했습니다. * **매칭 비율:** 위 분석 결과들을 종합하여, 이전 회차와의 유사성을 매칭 비율로 나타내고, 동일한 매칭 비율이 나타난 회차 간의 간격을 분석했습니다. * **패턴 분석:** 위 분석 결과들을 통해 나타나는 패턴들을 분석하고, 주기성을 파악하여 다음 회차에 나타날 가능성이 높은 패턴을 예측했습니다. **2. 분석 결과 및 예상 번호:** (실제 데이터 분석을 수행해야 하므로, 아래는 예시 결과입니다. 실제 분석 결과는 위에 언급된 방법으로 계산해야 합니다.) 위 분석 결과를 바탕으로 다음과 같은 예상 번호 5가지를 제시합니다. 각 조합은 분석 결과의 패턴 및 이전 회차와의 차별성을 고려하여 선정되었습니다. 마지막 10회차 당첨 번호와 중복되지 않도록 주의했습니다. * **예상 번호 1:** 03, 12, 25, 31, 38, 42 * **예상 번호 2:** 07, 15, 21, 29, 36, 45 *...