Answered step by step
Verified Expert Solution
Question
1 Approved Answer
plsease make the xml file, that file must contain all the recycler view, card view all these thing . . . . . . .
plsease make the xml file, that file must contain all the recycler view, card view all these thing public class FamerQuery extends AppCompatActivity
private Toolbar fQToolbar;
EditText etphnetquery;
MaterialButton btnsub;
String furl;
AppCompatImageView imageViewimageView;
static final int PICKIMAGEREQUESTONE ;
static final int PICKIMAGEREQUESTTWO ;
String filePathfilePath;
private Bitmap bitmapbitmap;
String uname,token,email,personId;
String phquery;
public static final int REQUESTIMAGE ;
static int PReqCode ;
private ProgressDialog progressDialog;
UserSession userSession;
TextView tvemn,tvquery,tvimagetvimage;
@Override
protected void onCreateBundle savedInstanceState
super.onCreatesavedInstanceState;
setContentViewRlayout.activityfamerquery;
etphn findViewByIdRidetphn;
etquery findViewByIdRidetquery;
btnsubfindViewByIdRidbtnsub;
imageView findViewByIdRidFQimageView;
imageView findViewByIdRidFQimageView;
userSession new UserSessionFamerQuerythis;
tvemn findViewByIdRidtvemn;
tvquery findViewByIdRidtvquery;
tvimage findViewByIdRidtvimage;
tvimage findViewByIdRidtvimage;
furl userSession.surl"upload.php;
if userSessiongetuName
Intent intentW new IntentFamerQuerythis, SignIn.class;
startActivityintentW;
FirebaseMessaging.getInstancegetToken
addOnCompleteListenernew OnCompleteListener
@Override
public void onComplete@NonNull Task task
if task.isSuccessful
Log.wWaring "Fetching FCM registration token failed", task.getException;
return;
Get new FCM registration token
token task.getResult;
Log.itoken token;
Log and toast
;
Generating Token
FirebaseInstanceIdgetInstancegetInstanceId
addOnCompleteListenernew OnCompleteListener
@Override
public void onComplete@NonNull Task task
if taskisSuccessful
token task.getResultgetToken;
Log.itoken token;
else
Toast.makeTextFamerQuerythis, task.getExceptiontoString Toast.LENGTHSHORTshow;
;
if userSessiongetLangequalseng
fQToolbar findViewByIdRidfqtoolbar;
fQToolbar.setTitlePost Query";
setSupportActionBarfQToolbar;
getSupportActionBarsetDisplayHomeAsUpEnabledtrue;
getSupportActionBarsetDisplayShowHomeEnabledtrue;
tvemn.setTextEnter Mobile No;
tvquery.setTextQuery;
tvimagesetTextImage ;
tvimagesetTextImage ;
btnsub.setTextSubmit Query";
final UserSession userSession new UserSessionFamerQuerythis;
fQToolbar.setNavigationOnClickListenernew View.OnClickListener
@Override
public void onClickView view
finish;
;
progressDialog new ProgressDialogthis android.Rstyle.ThemeMaterialLightDialogAlert;
progressDialog.setCancelablefalse;
progressDialog.setTitlegetStringRstring.please;
progressDialog.setMessagegetStringRstring.pleasemsg;
btnsub.setEnabledtrue;
btnsub.setOnClickListenernew View.OnClickListener
@Override
public void onClickView view
ph etphngetTexttoString;
query etquery.getTexttoString;
uname userSession.getuName;
email userSession.getUemail;
personId userSession.getPersonId;
if TextUtilsisEmptyetphngetTexttoString
Toast.makeTextFamerQuerythis, "Enter phone number", Toast.LENGTHLONGshow;
else if TextUtilsisEmptyetphngetTexttoString
Toast.makeTextFamerQuery
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started