This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// if the sha1 value will not match with firebase, it will not get the firebase project for u ..so if u r downloading your own project | |
// from github and its not working from firebase side..just check that sha1 value and package name is same or not. | |
open android studio | |
on right side there is gradle, click on that | |
then your project name(root) | |
then android | |
then signing report | |
in the run tab u will see the complete details of the project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.senamit.stationaryhutpro.fragments; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import com.example.senamit.stationaryhutpro.R; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://android.jlelse.eu/tablayout-and-viewpager-in-your-android-app-738b8840c38a | |
https://developer.android.com/reference/com/google/android/material/tabs/TabLayout | |
https://material.io/develop/android/components/tab-layout/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
holder.imgBox.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_box_green_two)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://stackoverflow.com/questions/37349845/is-it-possible-to-put-a-constraintlayout-inside-a-scrollview |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void loadRecentWords() { | |
db.collection("TwordColl") | |
.orderBy("time", Query.Direction.DESCENDING) | |
.limit(10) | |
.addSnapshotListener(new EventListener<QuerySnapshot>() { | |
@Override | |
public void onEvent(@Nullable QuerySnapshot value, | |
@Nullable FirebaseFirestoreException e) { | |
if (e!= null){ | |
Log.w(TAG, "listen failed "+e); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.addSnapshotListener(new EventListener<QuerySnapshot>() { | |
@Override | |
public void onEvent(@Nullable QuerySnapshot value, | |
@Nullable FirebaseFirestoreException e) { | |
if (e!= null){ | |
Log.w(TAG, "listen failed "+e); | |
return; | |
} | |
List<MessageModel> messageList = new ArrayList<>(); | |
for (DocumentSnapshot doc : value){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void bindView(View view) { | |
recyclerView = view.findViewById(R.id.recyclerview); | |
mLayoutManager = new LinearLayoutManager(context); | |
((LinearLayoutManager) mLayoutManager).setOrientation(LinearLayoutManager.HORIZONTAL); | |
mAdapter = new QuizQuestionAdap(context, this); | |
SnapHelper snapHelper = new PagerSnapHelper(); | |
snapHelper.attachToRecyclerView(recyclerView); | |
recyclerView.setLayoutManager(mLayoutManager); | |
recyclerView.setAdapter(mAdapter); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onCreateOptionsMenu(@NonNull Menu menu, @NonNull MenuInflater inflater) { | |
super.onCreateOptionsMenu(menu, inflater); | |
inflater.inflate(R.menu.menu_quiz, menu); | |
int positionOfMenuItem = 0; | |
MenuItem item = menu.getItem(positionOfMenuItem); | |
SpannableString s = new SpannableString("Submit"); | |
s.setSpan(new ForegroundColorSpan(Color.BLACK), 0, s.length(), 0); | |
item.setTitle(s); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SplashActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_splash); | |
Intent intent = new Intent(SplashActivity.this, SchoolDiaryMainActivity.class); | |
startActivity(intent); | |
finish(); |
OlderNewer