This is a login and signup page that is made in Android Studio
I've tried to make it with using material design and Java programming, and I would have liked to share it with other people, so I share it with you here :D
I hope it usable for you :)
This is a login and signup page in Android Studio
Home Page: http://mhkz.ir/
License: GNU General Public License v3.0
//custom adapter
package com.hunny.covidtracker;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.bumptech.glide.Glide;
import java.util.List;
public class mycustomadapter extends ArrayAdapter {
private Context context;
private List countrymodelList;
public mycustomadapter( Context context, List countrymodelList ) {
super(context, R.layout.list_custom,countrymodelList);
this.context=context;
this.countrymodelList=countrymodelList;
}
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
View view= LayoutInflater.from(parent.getContext()).inflate(R.layout.list_custom,null,true);
TextView tvcountryname=view.findViewById(R.id.countryname);
ImageView imageView=view.findViewById(R.id.imageflag);
tvcountryname.setText(countrymodelList.get(position).getCountry());
Glide.with(context).load(countrymodelList.get(position).getFlag()).into(imageView);
return view;
}
}
//COUNTRY MODEL
package com.hunny.covidtracker;
public class countrymodel {
private String flag, country, cases, deaths, todayCases, todayDeaths, recovered, activeCases, critical;
public countrymodel(String url, String countryname, String flagUrl, String flag, String country, String cases, String deaths, String todayCases, String todayDeaths, String recovered) {
this.flag = flag;
this.country = country;
this.cases = cases;
this.deaths = deaths;
this.todayCases = todayCases;
this.todayDeaths = todayDeaths;
this.recovered = recovered;
this.activeCases = activeCases;
this.critical = critical;
}
public String getFlag() {
return flag;
}
public void setFlag(String flag) {
this.flag = flag;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public String getCases() {
return cases;
}
public void setCases(String cases) {
this.cases = cases;
}
public String getDeaths() {
return deaths;
}
public void setDeaths(String deaths) {
this.deaths = deaths;
}
public String getTodayCases() {
return todayCases;
}
public void setTodayCases(String todayCases) {
this.todayCases = todayCases;
}
public String getTodayDeaths() {
return todayDeaths;
}
public void setTodayDeaths(String todayDeaths) {
this.todayDeaths = todayDeaths;
}
public String getRecovered() {
return recovered;
}
public void setRecovered(String recovered) {
this.recovered = recovered;
}
public String getActiveCases() {
return activeCases;
}
public void setActiveCases(String activeCases) {
this.activeCases = activeCases;
}
public String getCritical() {
return critical;
}
public void setCritical(String critical) {
this.critical = critical;
}
}
//Main Activity
package com.hunny.covidtracker;
import androidx.appcompat.app.AppCompatActivity;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.Toast;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.JsonArrayRequest;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;
import com.leo.simplearcloader.SimpleArcLoader;
import org.eazegraph.lib.models.PieModel;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.List;
public class effectedcountries extends AppCompatActivity {
EditText edsearch;
ListView listView;
SimpleArcLoader simpleArcLoader;
public static ListcountrymodelList=new ArrayList<>();
countrymodel countrymodel;
mycustomadapter mycustomadapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_effectedcountries2);
edsearch=findViewById(R.id.editsearch);
listView=findViewById(R.id.lv);
simpleArcLoader=findViewById(R.id.loader);
fetchdata();
}
private void fetchdata() {
String url ="https://corona.lmao.ninja/v2/countries";
simpleArcLoader.start();
StringRequest request = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
try {
JSONArray jsonArray=new JSONArray(response);
for(int i=0; i<jsonArray.length(); i++)
{
JSONObject jsonObject= jsonArray.getJSONObject(i);
String countryname=jsonObject.getString("country");
String totalcases=jsonObject.getString("cases");
String todaycases=jsonObject.getString("todayCases");
String totaldeath=jsonObject.getString("deaths");
String todaydeath=jsonObject.getString("todayDeaths");
String recovered=jsonObject.getString("recovered");
String todayrecovered=jsonObject.getString("todayRecovered");
String activecases=jsonObject.getString("active");
String totalpopulation=jsonObject.getString("population");
JSONObject object=jsonObject.getJSONObject("countryInfo");
String flagUrl=object.getString("flag");
countrymodel =new countrymodel(flagUrl,countryname,totalcases,todaycases,totaldeath,todaydeath,recovered,todayrecovered,activecases,totalpopulation);
}
mycustomadapter=new mycustomadapter(effectedcountries.this,countrymodelList);
listView.setAdapter(mycustomadapter);
simpleArcLoader.stop();
simpleArcLoader.setVisibility(View.GONE);
} catch (JSONException e) {
simpleArcLoader.stop();
simpleArcLoader.setVisibility(View.GONE);
e.printStackTrace();
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
simpleArcLoader.stop();
simpleArcLoader.setVisibility(View.GONE);
Toast.makeText(effectedcountries.this,error.getMessage(), Toast.LENGTH_SHORT).show();
}
});
RequestQueue requestQueue= Volley.newRequestQueue(this);
requestQueue.add(request);
}
}
I have built this project's into a (debug) APK for anybody looking for a quick login form to test with.
Beware, this project doesn't come with any autofill/autocomplete support so I added android:autofillHints="..."
to the main and register layouts and built a different APK with minimum API version 26 (Android 8.0)
Login-and-signup_NOAU.zip ("No" autofill, as in, no explicit autofillHints
)
Login-and-signup_WITH_AU.zip (With Autofill)
EDIT: I am NOT going to take responsibility nor will I update the project or fix any bugs. If the APK won't run on your device/emulator, please build it yourself as I am not going to provide any support for these binaries whatsoever. Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.