묻고 답해요
149만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)
파이어베이스 회원가입 실패
다이어트 메모 앱 만들기에서'파이어베이스 이메일 로그인 부분'을 만들고 있습니다. 아이디와 비밀번호를 입력하고회원가입 버튼을 클릭 시 시 실패라고 뜨면서위와같은 로그가 뜨고 있습니다.어떤 부분이 문제인 걸까요?ㅠㅠㅠ 아래는 github 링크입니다. https://github.com/minji9988/fb_firebase_email_password_auth
-
미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
게시글읽기 공부하고 있는데요
저는 리스트가 여러개 있는데 리스트뷰목록이 1개밖에 안뜨네요 흠.. 왜 그럴까요? 도와주세요
-
미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
이미지도 수정하고 싶어서 수정을 해봤습니다.
BoardWriteActivity 부분에 있던 이미지를 넣는 코드들(imageUpload 함수, onActivityResult 함수)을 그대로 복사해서 BoardEditActivity에 붙여넣기를 했습니다. 수정 화면에서 이미지를 클릭했을 때 기존 WriteActivity에서 이미지를 추가했을 때와 같이 나오고에러도 없이 실행이 되는데 이렇게 하는게 맞는건가 싶어서 질문드립니다! package com.example.mysolelife.board import android.content.Intent import android.graphics.Bitmap import android.graphics.drawable.BitmapDrawable import android.os.Bundle import android.provider.MediaStore import android.util.Log import android.widget.Toast import androidx.appcompat.app.AppCompatActivity import androidx.databinding.DataBindingUtil import com.bumptech.glide.Glide import com.example.mysolelife.R import com.example.mysolelife.databinding.ActivityBoardEditBinding import com.example.mysolelife.utils.FBAuth import com.example.mysolelife.utils.FBRef import com.google.android.gms.tasks.OnCompleteListener import com.google.firebase.database.DataSnapshot import com.google.firebase.database.DatabaseError import com.google.firebase.database.ValueEventListener import com.google.firebase.ktx.Firebase import com.google.firebase.storage.ktx.storage import java.io.ByteArrayOutputStream class BoardEditActivity : AppCompatActivity() { private lateinit var key: String private lateinit var binding: ActivityBoardEditBinding private val TAG = BoardEditActivity::class.java.simpleName private lateinit var writerUid: String private var isImageUpload = false override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) binding = DataBindingUtil.setContentView(this, R.layout.activity_board_edit) key = intent.getStringExtra("key").toString() getBoardData(key) getImageData(key) binding.editBtn.setOnClickListener { editBoardData(key) if (isImageUpload) { imageUpload(key) } } binding.imageArea.setOnClickListener { val gallery = Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI) startActivityForResult(gallery, 100) isImageUpload = true } } private fun editBoardData(key: String) { // 게시글 t FBRef.boardRef .child(key) .setValue( BoardModel( binding.titleArea.text.toString(), binding.contentArea.text.toString(), writerUid, FBAuth.getTime() ) ) Toast.makeText(this, "수정완료", Toast.LENGTH_LONG).show() finish() } private fun imageUpload(key: String) { // Get the data from an ImageView as bytes val storage = Firebase.storage // Create a storage reference from our app val storageRef = storage.reference // Create a reference to "mountains.jpg" val mountainsRef = storageRef.child("${key}.png") val imageView = binding.imageArea imageView.isDrawingCacheEnabled = true imageView.buildDrawingCache() val bitmap = (imageView.drawable as BitmapDrawable).bitmap val baos = ByteArrayOutputStream() bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos) val data = baos.toByteArray() var uploadTask = mountainsRef.putBytes(data) uploadTask.addOnFailureListener { // Handle unsuccessful uploads }.addOnSuccessListener { taskSnapshot -> // taskSnapshot.metadata contains file metadata such as size, content-type, etc. // ... } } override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(requestCode, resultCode, data) if (resultCode == RESULT_OK && requestCode == 100) { binding.imageArea.setImageURI(data?.data) } } private fun getImageData(key: String) { // Reference to an image file in Cloud Storage val storageReference = Firebase.storage.reference.child("${key}.png") // ImageView in your Activity val imageViewFromFB = binding.imageArea storageReference.downloadUrl.addOnCompleteListener(OnCompleteListener { task -> if (task.isSuccessful) { Glide.with(this) .load(task.result) .into(imageViewFromFB) } else { } }) } private fun getBoardData(key: String) { val postListener = object : ValueEventListener { override fun onDataChange(dataSnapshot: DataSnapshot) { // 데이터를 하나만 가져오면 되므로 반복문 사용이 필요 없다. val dataModel = dataSnapshot.getValue(BoardModel::class.java) Log.d(TAG, dataModel!!.title) binding.titleArea.setText(dataModel.title) binding.contentArea.setText(dataModel.content) writerUid = dataModel.uid } override fun onCancelled(databaseError: DatabaseError) { // Getting Post failed, log a message Log.w(TAG, "loadPost:onCancelled", databaseError.toException()) } } FBRef.boardRef.child(key).addValueEventListener(postListener) } }
-
미해결Flutter + Firebase로 넷플릭스 UI 클론 코딩하기 [무작정 플러터]
TabController controller를 넣게되면 오류가 나고 late를 넣으면 정상으로 작동되는데 이유를 알 수 있을까요?
(사진)
-
미해결따라하며 배우는 리액트, 파이어베이스 - 채팅 어플리케이션 만들기[2023.12 리뉴얼]
강의 도표 자료 다운을 받으면, zip파일에 아무것도 들어있지않다고 나옵니다.
윈도우 운영체제를 쓰는데 강의 도표 자료 다운을 받으면, zip파일에 아무것도 들어있지않다고 나옵니다.다시 강의 도표 자료를 올려주실 수 있을까요?
-
미해결[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)
item들의 간격이 너무 크게 나옵니다
이렇게 너무 아이템들이 각각 크게 나오는데 이런경우는 뭐가 문제일까요? <?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=".MainActivity"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/rv" android:layout_height="match_parent" android:layout_width="match_parent" /> </androidx.constraintlayout.widget.ConstraintLayout>위의 코드는 activitymain의 layout입니다
-
미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
안드로이드 스튜디오에서 엔터키 줄바꿈 안됨
한참 코딩 하다가 갑자기 줄바꿈 엔터키가 안먹네요재부팅을 해도 안되고 스튜디오 재설치해도 안되네요혹시 몰라서 다른 키보드를 바꿔 봤어도 안되네요왜 안되는지 참 난감합니다. 도와 주세요
-
해결됨풀스택 리액트 라이브코딩 - 간단한 쇼핑몰 만들기
1일차 fetch api 진행 시 CORS 에러
1일차 fetch api 진행 시 CORS 에러가 발생합니다. node.js 와 express를 활용해서 프록시 서버를 만듦으로 해결할 수 있을 꺼같은데. 강의에서는 cors 에러가 발생하지 않은 것 같은데 왜 저만 발생하는 지 궁금합니다. 추가로 당연히 해결방안 또한 궁금합니다.
-
미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
파이어 베이스 로그인 및 회원가입 질문입니다.
.
-
해결됨vue.js 실전 프로젝트(트위터 클론)
permission denied firebase 에러
firebase 스토리지 최초 생성하고 프로필 이미지를 올렸을 때 permission denied firebase 에러가 날수있습니다.강의에서 따로 언급되지는 않았는데 이럴경우 storage > Rules에서 allow read, write: if false;를 allow read, write: if true;로 바꿔주시기 바랍니다.
-
미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
강의 열심히 수강 하고 잘 듣고 있습니다. 잠시 응용한번 해봤는데요
잠시 응용해봤는데요class ImdaeSaActivity : AppCompatActivity() { private val TAG = ImdaeSaActivity::class.java.simpleName private lateinit var auth: FirebaseAuth private val data = arrayListOf<ImdaeTodo>() private lateinit var binding: ActivityImdaeSaBinding override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) // setContentView(R.layout.activity_imdae_sa) binding = DataBindingUtil.setContentView(this, R.layout.activity_imdae_sa) auth = Firebase.auth auth = FirebaseAuth.getInstance() binding = ActivityImdaeSaBinding.inflate(layoutInflater) val view = binding.root setContentView(view) binding.imadaeBtn.setOnClickListener { val sename = binding.sename.text.toString() val sephone = binding.sephoneno.text.toString() val address = binding.etAddress.text.toString() val address1 = binding.etAddress1.text.toString() val kwanry = binding.kwanry.text.toString() val bojung = binding.bojung.text.toString() val worldse = binding.worldse.text.toString() val mjbb = binding.myungjuk.text.toString() val cgbb = binding.chunggo.text.toString() val uid = FBAuth.getUid() val time = FBAuth.getTime() Log.d(TAG, sename) Log.d(TAG, sephone) FBRef.Imdae .push() .setValue( ImdaeitemModel( sename, sephone, address, address1, kwanry, bojung, worldse, mjbb, cgbb, uid, time ) ) } } }한번볼께요<layout> <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=".List.ImdaeSaActivity"> <LinearLayout android:id="@+id/linearLayout3" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#FFE3E3E3" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginTop="10dp" android:layout_marginRight="10dp" android:layout_marginBottom="10dp" android:gravity="center|center_horizontal" android:background="@drawable/mocer_call_yello_title" android:orientation="horizontal"> <TextView android:id="@+id/imdaetitle" android:layout_width="wrap_content" android:layout_height="50dp" android:gravity="center" android:text="임대등록 하세요" android:textSize="20sp" android:textStyle="bold" /> <EditText android:id="@+id/imdaeData" android:layout_width="48dp" android:layout_height="wrap_content" android:gravity="center" android:text="날자" android:textSize="20sp"/> </LinearLayout> <androidx.core.widget.NestedScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_marginBottom="10dp" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="5dp" android:background="@drawable/mocer_call_mulback" android:orientation="horizontal"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="10dp" android:orientation="horizontal"> <LinearLayout android:layout_width="wrap_content" android:layout_height="match_parent" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginTop="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:gravity="left" android:text="물전종류" android:textSize="15sp"/> </LinearLayout> <TextView android:id="@+id/mulgunall" android:layout_width="match_parent" android:layout_height="40dp" android:layout_gravity="center_vertical" android:background="@drawable/mocer_call_no" android:gravity="center_horizontal|center_vertical" android:hint="물건종류를 선택하세요" android:textSize="20sp" android:textStyle="italic" tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/mocer_call" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginTop="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:gravity="left" android:text="연락정보" android:textSize="15sp" android:textStyle="bold" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <EditText android:id="@+id/sename" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1.7" android:background="@drawable/mocer_call_mulback1" android:hint="이름" android:paddingLeft="10dp" android:paddingTop="10dp" android:paddingBottom="10dp" android:textSize="20sp" tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" /> <EditText android:id="@+id/sephoneno" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_weight="1" android:background="@drawable/mocer_call_mulback1" android:hint="세입자폰번호" android:inputType="phone" android:maxLength="13" android:paddingLeft="10dp" android:paddingTop="10dp" android:paddingBottom="10dp" android:textSize="20sp" tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" /> </LinearLayout> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="5dp" android:background="@drawable/mocer_call" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left|center_vertical" android:layout_marginLeft="10dp" android:layout_marginTop="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:gravity="center|left" android:text="주 소" android:textSize="15sp" android:textStyle="bold" /> <EditText android:id="@+id/etAddress" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:background="@drawable/mocer_call_mulback1" android:hint="주소입력하세요" android:inputType="textMultiLine" android:paddingLeft="10dp" android:paddingTop="10dp" android:paddingRight="5dp" android:paddingBottom="10dp" android:textSize="18sp" tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" /> <EditText android:id="@+id/etAddress1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:background="@drawable/mocer_call_mulback1" android:hint="상세주소 입력하세요" android:inputType="textMultiLine" android:paddingLeft="10dp" android:paddingTop="10dp" android:paddingRight="5dp" android:paddingBottom="10dp" android:textSize="18sp" tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="5dp" android:background="@drawable/mocer_call" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="5dp" android:layout_marginTop="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <TextView android:layout_width="80dp" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginTop="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:gravity="left" android:text="상세내용" android:textSize="15sp" android:textStyle="bold" /> <TextView android:layout_width="80dp" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginTop="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:gravity="left" android:text="(단위|만원)" android:textColor="#985B01" android:textSize="13sp" android:textStyle="bold" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <EditText android:id="@+id/kwanry" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:layout_weight="1" android:background="@drawable/mocer_call_mulback1" android:hint="관리비" android:inputType="number" android:paddingLeft="5dp" android:paddingTop="10dp" android:paddingRight="5dp" android:paddingBottom="10dp" android:textSize="18sp" tools:ignore="TouchTargetSizeCheck" /> <EditText android:id="@+id/bojung" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:layout_weight="1" android:background="@drawable/mocer_call_mulback1" android:hint="보증금" android:inputType="number" android:paddingLeft="5dp" android:paddingTop="10dp" android:paddingRight="5dp" android:paddingBottom="10dp" android:textSize="18sp" tools:ignore="TouchTargetSizeCheck" /> <EditText android:id="@+id/worldse" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:layout_weight="1" android:background="@drawable/mocer_call_mulback1" android:hint="월세" android:inputType="number" android:paddingLeft="5dp" android:paddingTop="10dp" android:paddingRight="5dp" android:paddingBottom="10dp" android:textSize="18sp" tools:ignore="TouchTargetSizeCheck" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:orientation="vertical"> <TextView android:layout_width="60dp" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginTop="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:gravity="left" android:text="면 적" android:textSize="15sp" android:textStyle="bold" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <EditText android:id="@+id/myungjuk" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:layout_weight="1" android:background="@drawable/mocer_call_mulback1" android:gravity="right|center" android:hint="면적" android:paddingLeft="5dp" android:paddingTop="10dp" android:paddingRight="5dp" android:paddingBottom="10dp" android:textSize="18sp" tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left|center_vertical" android:text="㎡" android:textSize="10sp" /> <LinearLayout android:layout_width="2dp" android:layout_height="20dp" android:layout_marginLeft="3dp" android:layout_marginTop="5dp" android:layout_marginRight="3dp" android:layout_marginBottom="5dp" android:background="@color/black" /> <EditText android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:layout_weight="1" android:background="@drawable/mocer_call_mulback1" android:gravity="right|center" android:hint="평수" android:paddingLeft="5dp" android:paddingTop="10dp" android:paddingRight="5dp" android:paddingBottom="10dp" android:textSize="18sp" tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left|center_vertical" android:text="평" android:textSize="10sp" /> <LinearLayout android:layout_width="2dp" android:layout_height="20dp" android:layout_marginLeft="3dp" android:layout_marginTop="5dp" android:layout_marginRight="3dp" android:layout_marginBottom="5dp" android:background="@color/black" /> <EditText android:id="@+id/chunggo" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:layout_weight="1" android:background="@drawable/mocer_call_mulback1" android:gravity="right|center" android:hint="층고" android:paddingLeft="5dp" android:paddingTop="10dp" android:paddingRight="5dp" android:paddingBottom="10dp" android:textSize="18sp" tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left|center_vertical" android:gravity="left" android:text="m" android:textSize="10sp" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="5dp" android:orientation="horizontal"> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:layout_weight="1" android:background="@drawable/mocer_call_mulback1" android:hint="방/욕실수" android:paddingLeft="5dp" android:paddingTop="10dp" android:paddingRight="5dp" android:paddingBottom="10dp" android:textSize="18sp" tools:ignore="TouchTargetSizeCheck" /> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:layout_weight="1" android:background="@drawable/mocer_call_mulback1" android:hint="총층수" android:paddingLeft="5dp" android:paddingTop="10dp" android:paddingRight="5dp" android:paddingBottom="10dp" android:textSize="18sp" tools:ignore="TouchTargetSizeCheck" /> </LinearLayout> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="5dp" android:background="@drawable/mocer_call" android:orientation="vertical"> <com.google.android.material.card.MaterialCardView android:id="@+id/layout01" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginHorizontal="10dp" android:layout_marginTop="5dp" android:outlineProvider="none" app:cardBackgroundColor="@color/white"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:text="옵 션" android:textSize="22sp" android:textStyle="bold" /> </com.google.android.material.card.MaterialCardView> <com.google.android.material.card.MaterialCardView android:id="@+id/layoutDetail01" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="5dp" android:layout_marginHorizontal="10dp" android:backgroundTint="#ffffff" android:visibility="visible" app:cardCornerRadius="15dp" app:strokeColor="#aaa" app:strokeWidth="1dp"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_marginTop="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:gravity="center" android:orientation="horizontal"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical"> <EditText android:id="@+id/option" android:layout_width="200dp" android:layout_height="40dp" android:background="@drawable/mocer_call_mulback1" android:gravity="center" android:hint="옵션등록10자까지만" android:textSize="15sp" tools:ignore="TouchTargetSizeCheck" /> </LinearLayout> <Button android:id="@+id/add_button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:text="추 가" /> </LinearLayout> <androidx.recyclerview.widget.RecyclerView android:id="@+id/recycler_view" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="5dp" android:layout_marginLeft="5dp" /> </LinearLayout> </com.google.android.material.card.MaterialCardView> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="5dp" android:background="@drawable/mocer_call" android:orientation="vertical"> <com.google.android.material.card.MaterialCardView android:id="@+id/layout02" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginHorizontal="10dp" android:layout_marginTop="5dp" android:outlineProvider="none"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:text="메 모" android:textSize="22sp" android:textStyle="bold" /> <ImageButton android:id="@+id/layoutBtn02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right" android:layout_margin="10dp" android:background="@android:color/transparent" android:clickable="false" android:src="@drawable/arrow_up" android:textSize="22sp" tools:ignore="SpeakableTextPresentCheck" /> </com.google.android.material.card.MaterialCardView> <com.google.android.material.card.MaterialCardView android:id="@+id/layoutDetail02" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="5dp" android:layout_marginHorizontal="10dp" android:backgroundTint="#ffffff" android:visibility="visible" app:cardCornerRadius="15dp" app:strokeColor="#aaa" app:strokeWidth="1dp"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/white" android:gravity="center_horizontal" android:orientation="vertical"> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:layout_marginBottom="5dp" android:background="@drawable/mocer_call_mulback2" android:hint="필요한 내용 있으시면 여기에 메모해 주시면 됩니다. 내용은 길게 쓰셔도 되요" /> </LinearLayout> </com.google.android.material.card.MaterialCardView> </LinearLayout> </LinearLayout> </LinearLayout> </androidx.core.widget.NestedScrollView> </LinearLayout> <Button android:id="@+id/imadaeBtn" android:layout_width="60dp" android:layout_height="60dp" android:layout_marginLeft="15dp" android:layout_marginRight="15dp" android:layout_marginBottom="15dp" android:text="입 력" android:textSize="20sp" android:background="@drawable/mocer_call_yello_button" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" /> </androidx.constraintlayout.widget.ConstraintLayout> </layout>근데 파이어베이스에 들어가보면 uid값은 null로 나오고 가져오질 못하더라구요 그리고 보안 규칙을 { "rules": { ".read": "auth.uid !== null", ".write": "auth.uid !== null" } }로 하고 로그인을 한 다음 하면 파이어베이스에 게시글이 안들어 가지고 보안규칙을{ "rules": { ".read": "true", ".write": "true" }}해야 지만 게시글이 들어 가지더라구요참 왜 그러는지 잘 모루겠습니다.한번 살펴 봐 주시면 정말 감사하겠습니다.
-
미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
dataModel 에서 값을 갖고 오지 못합니다
수정 버튼을 누르고 이후에 수정하는 페이지가 나올때 binding을 통해 dataModel 값들을 불러오지 못하고 오류가 납니다 class BoardEditActivity : AppCompatActivity() { private lateinit var key:String private lateinit var binding : ActivityBoardEditBinding private val TAG = BoardEditActivity::class.java.simpleName override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) binding = DataBindingUtil.setContentView(this, R.layout.activity_board_edit) key = intent.getStringExtra("key").toString() getBoardData(key) } private fun getBoardData(key : String){ val postListener = object : ValueEventListener { override fun onDataChange(dataSnapshot: DataSnapshot) { val dataModel = dataSnapshot.getValue(BoardModel::class.java) Log.d(TAG, dataModel.toString()) // Log.d(TAG, dataModel!!.title) // Log.d(TAG, dataModel!!.time) binding.titleArea.setText(dataModel?.title) binding.contentArea.setText(dataModel?.content) } override fun onCancelled(databaseError: DatabaseError) { // Getting Post failed, log a message Log.w(TAG, "loadPost:onCancelled", databaseError.toException()) } } FBRef.boardRef.child(key).addValueEventListener(postListener) } } 이게 현재 코드입니다여기서 저번 강의때 try catch 구문 쓰셨던 것과 같은 문제가 발생합니다그래서 try catch 를 쓰면 오류가 나와 페이지로만 이동하게 되어 아무것도 표시되지 않습니다 안드로이드 스튜디오 버전은 Electric Eel 입니다
-
미해결따라하며 배우는 리액트, 파이어베이스 - 채팅 어플리케이션 만들기[2023.12 리뉴얼]
Favorite.js 질문입니다.! 화면 새로고침하면, 추가한 Favorite chatrooms가 날라가고 딱 1개만 남습니다!
Favorite.js 질문입니다.! 화면 새로고침하면, 추가한 Favorite chatrooms가 날라가고 딱 1개만 남습니다! MessageHeader에서 채팅방 하트 꾸욱 눌러 favorite에 넣으면,SidePanel에 Favorite이 업데이트되어 채팅방이 입력됩니다.Favorite 채팅방 목록 나오고, 개수까지 다 잘 나와요;잘 됩니다. 하지만, F5 새로고침을 누르면 Favorite에는 결국, 1개의 채팅방만 나오고 나머지는 싹 다 날라갑니다.최초에 파이어베이스에서 채팅방목록을 모두 못불러오는것 같아요.코드 수정을 해야할 것 같은데요,작성해주신 코드를 보면 잘못된건 없는것 같은데 왜 그럴까요?
-
미해결[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)
title.text = List[] 질문
val title = convertView!!.findViewById<TextView>(R.id.listViewitem) title.text = List[] 이 부분에서 context 와 text로 나누지않고 한번에listviewmodel의 아이템을 한번에 보여줄순 없나요?예시를 들면 list_item.add(listviewmodel("faker","mid",28))저는 이 faker,mid,28을 한꺼번에 보여주고 싶은 경우에는 어떻게 해야 하나요?
-
미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
게시글 삭제 시 화면 이동
게시글 삭제했을 때 따로 화면 이동이 발생하도록 처리를 해주시지 않으셔서 삭제했을 때 게시글 목록이 있는 화면으로 넘어가도록 처리해주고 싶습니다. 이때 intent로 처리하고자 했으나 talkFragment는 액티비티가 아니라서 원하는 대로 되질 않는데 혹시 어떻게 처리해주면 되나요?
-
미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
로그인 오류가 납니다.
.
-
해결됨[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
사진 업로드 기능
처음 글을 쓸 때 사진을 추가하는 버튼을 눌렀다가 사진을 선택하지 않았을 경우에도 클릭리스너한테 걸려서 까만화면이 뜨는데 이럴 때는 어떤 조건을 걸어주면 되나요?
-
미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
닉네임 중복검사 시 404 에러
서버 주소도 제대로 전달한 것 같은데 404 에러가 뜨는데 뭐가 잘못된걸까요
-
미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
myref 초기화가 안됩니다
3분 8초에 있는 변경 하는 것을 했습니다처음에 타이틀 출력하는 건 됩니다근데 이후로 넘어 가지를 않습니다버전은 전기뱀장어입니다오류 내용입니다
-
미해결[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
회원가입 파이어 베이스 질문입니다.
가입은 되는데 가입버튼을 누를 때 처음엔 실패나 성공 메세지가 생성이 안됩니다. 그리고 가입을 3~4번하고 난 후에 다시 가입버튼 누를 때 실패나 성공 메세지가 생성됩니다.2023-03-10 03:55:08.889 7397-7482/com.example.myapplication666 W/System: Ignoring header X-Firebase-Locale because its value was null. 이런 로그가 띄어집니다.