Advertisement
Guest User

adam's code

a guest
Sep 4th, 2016
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 24.75 KB | None | 0 0
  1. MainActivity.java
  2. ===========================
  3. package com.example.adm.myapplication;
  4.  
  5. import android.app.Activity;
  6. import android.app.Fragment;
  7. import android.content.DialogInterface;
  8. import android.content.Intent;
  9. import android.content.SharedPreferences;
  10. import android.net.Uri;
  11. import android.support.v7.app.AlertDialog;
  12. import android.support.v7.app.AppCompatActivity;
  13. import android.os.Bundle;
  14. import android.view.LayoutInflater;
  15. import android.view.View;
  16. import android.widget.Button;
  17. import android.widget.EditText;
  18. import android.widget.TextView;
  19. import android.widget.Toast;
  20. import android.content.Context;
  21.  
  22. import com.google.android.gms.appindexing.Action;
  23. import com.google.android.gms.appindexing.AppIndex;
  24. import com.google.android.gms.common.api.GoogleApiClient;
  25.  
  26. import java.util.Objects;
  27.  
  28. public class MainActivity extends AppCompatActivity {
  29.  
  30.  
  31.     EditText txtUserName;
  32.     EditText txtUserPassword;
  33.     TextView lblMsg;
  34.     Context context;
  35.     private int totalTry = 5;
  36.     Button btnLogin;
  37.     Button btnRegister;
  38.     EditText txtUser,txtPass,txtPass2;
  39.  
  40.  
  41.     @Override
  42.     protected void onCreate(Bundle savedInstanceState) {
  43.         super.onCreate(savedInstanceState);
  44.         setContentView(R.layout.activity_main);
  45.         setPointer();
  46.         this.context = this;
  47.  
  48.  
  49.     }
  50.  
  51.     private void setPointer() {
  52.         this.context = this;
  53.  
  54.  
  55.         lblMsg = (TextView) findViewById(R.id.lblMsg);
  56.         btnLogin = (Button) findViewById(R.id.btnLogin);
  57.         btnRegister = (Button) findViewById(R.id.btnRegister);
  58.         txtUser = (EditText) findViewById(R.id.txtUserName);
  59.         txtPass = (EditText) findViewById(R.id.txtPassword);
  60.         txtPass2 = (EditText) findViewById(R.id.txtPassword2);
  61.         txtUserName = (EditText) findViewById(R.id.txtUserName);
  62.         txtUserPassword = (EditText) findViewById(R.id.txtUserPassword);
  63.  
  64.  
  65.  
  66.  
  67.  
  68.         //listerners
  69.     btnLogin.setOnClickListener(new View.OnClickListener() {
  70.         @Override
  71.         public void onClick(View view) {
  72.             login();
  73.         }
  74.     });
  75.  
  76.     btnRegister.setOnClickListener(new View.OnClickListener() {
  77.         @Override
  78.         public void onClick(View view) {
  79.             register();
  80.         }
  81.     });
  82. }
  83.  
  84.  
  85.  
  86.     private void login() {
  87.         String getUser=txtUserName.getText().toString();
  88.         String getPass=txtUserPassword.getText().toString();
  89.  
  90.         if (totalTry == 0) {
  91.             Toast.makeText(MainActivity.this, R.string.blocked, Toast.LENGTH_SHORT).show();
  92.             return;
  93.         }
  94.         utlShared shared = new utlShared(this);
  95.         if (shared.checkUserPassword(getUser, getPass)) {
  96.             lblMsg.setText(R.string.userLoged);
  97.             Intent intent = new Intent(this, Welcom.class);
  98.             intent.putExtra("userName", getUser);
  99.             startActivity(intent);
  100.  
  101.         } else {
  102.  
  103.             if (shared.checkUser(getUser)) {
  104.                 Toast.makeText(MainActivity.this, R.string.wrongpass, Toast.LENGTH_LONG).show();
  105.             } else {
  106.                 showLoginErrorDialog();
  107.             }
  108.         }
  109.     }
  110.  
  111.  
  112.     public void register() {
  113.         //create builder
  114.         android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(context);
  115.         //set title
  116.         builder.setTitle(R.string.register);
  117.  
  118.         //inflate view from layout ->custom layout,null,false as defualt values
  119.         View viewInflated = LayoutInflater.from(context).inflate(R.layout.dlg_new_task, null, true);
  120.  
  121.         final EditText txtUser = (EditText)viewInflated.findViewById(R.id.txtUserName);
  122.         final EditText txtPass = (EditText)viewInflated.findViewById(R.id.txtPassword);
  123.         final EditText txtPass2 = (EditText)viewInflated.findViewById(R.id.txtPassword2);
  124.  
  125.         builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
  126.             @Override
  127.             public void onClick(DialogInterface dialogInterface, int i) {
  128.                 dialogInterface.dismiss();
  129.             }
  130.         });
  131.  
  132.  
  133.  
  134.         final utlShared myShared = new utlShared(context);
  135.         builder.setPositiveButton(R.string.register, new DialogInterface.OnClickListener() {
  136.  
  137.             @Override
  138.             public void onClick(DialogInterface dialogInterface, int i) {
  139.                 dialogInterface.dismiss();
  140.  
  141.                 String pass1=txtPass.getText().toString();
  142.                 String pass2=txtPass2.getText().toString();
  143.  
  144.                 if (!pass1.equals(pass2)) {
  145.                     Toast.makeText(context, R.string.errorSamepass, Toast.LENGTH_LONG).show();
  146.                     register();
  147.                     return;
  148.                 }
  149.  
  150.                 utlShared myShared = new utlShared(context);
  151.                 String userName=txtUser.getText().toString();
  152.  
  153.                 //check if user exists
  154.                 if (myShared.checkUser(userName)) {
  155.                     Toast.makeText(context, R.string.userExixst, Toast.LENGTH_SHORT).show();
  156.                     register();
  157.                     return;
  158.                 }
  159.                 //running the method of add user
  160.                 myShared.addUser(userName,pass1);
  161.  
  162.  
  163.  
  164.             }
  165.         });
  166.  
  167.         //display our inflated view in screen
  168.         builder.setView(viewInflated);
  169.         //show the dialog
  170.         builder.show();
  171.  
  172.     }
  173.  
  174.  
  175.  
  176.     private void showLoginErrorDialog() {
  177.         final String getUser = txtUser.getText().toString();
  178.         final utlShared shared = new utlShared(context);
  179.  
  180.         if (! shared.checkUser(getUser)) {
  181.             new AlertDialog.Builder(context).setTitle(R.string.user_not_found)
  182.                     .setMessage(R.string.wantToRegist)
  183.                     .setPositiveButton(R.string.register, new DialogInterface.OnClickListener() {
  184.                         @Override
  185.                         public void onClick(DialogInterface dialogInterface, int i) {
  186.  
  187.  
  188.                             dialogInterface.dismiss();
  189.                             register();
  190.  
  191.                         }
  192.  
  193.                     })
  194.  
  195.                     .setNegativeButton(R.string.tryAgain, new DialogInterface.OnClickListener() {
  196.                         @Override
  197.                         public void onClick(DialogInterface dialogInterface, int i) {
  198.                             Toast.makeText(context, R.string.tryAgain, Toast.LENGTH_SHORT).show();
  199.                             dialogInterface.dismiss();
  200.                         }
  201.                     })
  202.  
  203.                     .show();
  204.         }
  205.         }
  206.  
  207.  
  208. }
  209.  
  210. Welcome.java
  211. ===============================
  212.  
  213. package com.example.adm.myapplication;
  214.  
  215.  
  216. import android.app.AlertDialog;
  217. import android.content.Context;
  218.  
  219. import android.content.DialogInterface;
  220. import android.support.v7.app.AppCompatActivity;
  221. import android.os.Bundle;
  222. import android.text.InputType;
  223. import android.view.LayoutInflater;
  224. import android.view.View;
  225. import android.widget.EditText;
  226. import android.widget.ListView;
  227. import android.widget.Toast;
  228.  
  229. public class Welcom extends AppCompatActivity {
  230.  
  231.  
  232.     String userName;
  233.     Context context;
  234.     utlShared myUtl;
  235.     ListView taskList;
  236.     @Override
  237.     protected void onCreate(Bundle savedInstanceState) {
  238.         super.onCreate(savedInstanceState);
  239.         setContentView(R.layout.activity_welcom);
  240.         setPointer();
  241.  
  242.     }
  243.  
  244.     private void setPointer()
  245.     {
  246.         this.context=this;
  247.         userName=getIntent().getStringExtra("userName");
  248.         myUtl = new utlShared(context);
  249.         taskList=(ListView)findViewById(R.id.taskList);
  250.         setListData();
  251.         Toast.makeText(Welcom.this, "Welcome " +userName, Toast.LENGTH_SHORT).show();
  252.     }
  253.  
  254.     private void setListData()
  255.     {
  256.         TaskAdapter adapter = new TaskAdapter(context,userName);
  257.         taskList.setAdapter(adapter);
  258.     }
  259.  
  260.  
  261.  
  262.  
  263.     public void addCustomTask(View view)
  264.     {
  265.         //create builder
  266.         AlertDialog.Builder builder = new AlertDialog.Builder(context);
  267.         //set title
  268.         builder.setTitle(R.string.addnewtask);
  269.  
  270.         //inflate view from layout ->custom layout,null,false as defualt values
  271.         View viewInflated= LayoutInflater.from(context).inflate(R.layout.weed,null,false);
  272.  
  273.         final EditText txtCustomTask = (EditText)viewInflated.findViewById(R.id.txtTask);
  274.  
  275.         builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
  276.             @Override
  277.             public void onClick(DialogInterface dialogInterface, int i) {
  278.                 dialogInterface.dismiss();
  279.             }
  280.         });
  281.  
  282.         builder.setPositiveButton(R.string.addtask, new DialogInterface.OnClickListener() {
  283.             @Override
  284.             public void onClick(DialogInterface dialogInterface, int i) {
  285.                 dialogInterface.dismiss();
  286.                 String myTask = txtCustomTask.getText().toString();
  287.                 //Toast.makeText(context, "task is:"+myText, Toast.LENGTH_SHORT).show();
  288.                 myUtl.task(userName,myTask,false);
  289.                 /////
  290.                 setListData();
  291.             }
  292.         });
  293.  
  294.         //display our inflated view in screen
  295.         builder.setView(viewInflated);
  296.         //show the dialog
  297.         builder.show();
  298.  
  299.     }
  300.  
  301.  
  302. }
  303.  
  304.  
  305. TaskAdapter.java
  306. =========================================
  307.  
  308. package com.example.adm.myapplication;
  309.  
  310. import android.content.Context;
  311. import android.content.SharedPreferences;
  312. import android.view.LayoutInflater;
  313. import android.view.View;
  314. import android.view.ViewGroup;
  315. import android.widget.BaseAdapter;
  316. import android.widget.Switch;
  317. import android.widget.TextView;
  318. import android.widget.Toast;
  319.  
  320. import java.util.ArrayList;
  321. import java.util.List;
  322. import java.util.Map;
  323.  
  324. /**
  325.  * Created by ADM on 9/3/2016.
  326.  */
  327. public class TaskAdapter extends BaseAdapter {
  328.  
  329.     //transfer context
  330.     Context context;
  331.     //transfer user to use for shared preferences
  332.     String userName;
  333.     //create a list of tasks.....
  334.     List<taskItem> myTasks;
  335.  
  336.     //constructor, for creating the adapter we need from the user context and userName
  337.     public TaskAdapter(Context context,String userName) {
  338.         this.context = context;
  339.         this.userName=userName;
  340.         //go to user shared preferences and fill the list
  341.         getData();
  342.     }
  343.  
  344.     //how many item to display
  345.     @Override
  346.     public int getCount() {
  347.         //return the myTasks size....
  348.         return myTasks.size();
  349.     }
  350.  
  351.     //return a specific item by index
  352.     @Override
  353.     public Object getItem(int i) {
  354.         return myTasks.get(i);
  355.     }
  356.  
  357.     //return index number
  358.     @Override
  359.     public long getItemId(int i) {
  360.         return 0;
  361.     }
  362.  
  363.     //create our view
  364.     @Override
  365.     public View getView(int index, View view, ViewGroup viewGroup) {
  366.         //inflate the view inside view object -> viewInflated
  367.         View viewInflated = LayoutInflater.from(context).inflate(R.layout.task_item,null,false);
  368.  
  369.         //set our inflated view behiver
  370.  
  371.         //set pointer for our inflated view
  372.  
  373.         //set pointer for task name....
  374.         final TextView txtTaskName=(TextView)viewInflated.findViewById(R.id.taskName);
  375.         //set pointer for task status....
  376.         final Switch swTask=(Switch)viewInflated.findViewById(R.id.taskDone);
  377.  
  378.         //set task name, by the index of my myTasks collection
  379.         txtTaskName.setText(myTasks.get(index).taskName);
  380.         //set task status , switch is getting true/false
  381.         swTask.setChecked(myTasks.get(index).taskStatus);
  382.  
  383.  
  384.         //create listener event, when switch is pressed
  385.         swTask.setOnClickListener(new View.OnClickListener() {
  386.             @Override
  387.             public void onClick(View view) {
  388.                 //we using utlShared to update task status
  389.                 //create instance of utlShared
  390.                 utlShared myShared = new utlShared(context);
  391.                 //calling method of task, and giving userName(shared preferences, taskName, taskStatus)
  392.                 myShared.task(userName,txtTaskName.getText().toString(),swTask.isChecked());
  393.                 //we sending a message to the user, and inform him/her about the change
  394.                 Toast.makeText(context, swTask.isChecked()?"task done" :"Task undone...", Toast.LENGTH_SHORT).show();
  395.             }
  396.         });
  397.  
  398.         //return the view with the behiver.....
  399.         return viewInflated;
  400.     }
  401.  
  402.     private void getData()
  403.     {
  404.         //go to specific shared preferences by user name.....
  405.         SharedPreferences taskPref=context.getSharedPreferences(userName,context.MODE_PRIVATE);
  406.  
  407.         //create instance of our myTasks list
  408.         myTasks = new ArrayList<>();
  409.         //get all tasks from shared preferances
  410.         //the shared preferences is by key and value, therefor we will use Map collection
  411.         //we know that the key is String, but we don't know what type of value we will get. <K,?>
  412.         Map<String,?> tasks=taskPref.getAll();
  413.         // transfer the data from map collection to list collection , single item is like the defination of the tasks <String,?>
  414.         //Entry -> record , enterSet -> set of records
  415.         for(Map.Entry<String,?> singleTask:tasks.entrySet())
  416.         {
  417.             //insert task to list by Key and Value, we check if value is equal to 1, becuase 1=true 0=false
  418.             myTasks.add(new taskItem(singleTask.getKey(),singleTask.getValue().equals("1")));
  419.         }
  420.     }
  421.  
  422. }
  423.  
  424.  
  425. TaskItem.java
  426. ==========================================================
  427. package com.example.adm.myapplication;
  428.  
  429. /**
  430.  * Created by ADM on 9/3/2016.
  431.  */
  432. public class taskItem {
  433.     public String taskName;
  434.     public boolean taskStatus;
  435.  
  436.     public taskItem(String taskName, boolean taskStatus) {
  437.         this.taskName = taskName;
  438.         this.taskStatus = taskStatus;
  439.     }
  440. }
  441.  
  442. utlShared.java
  443. ===============================================
  444.  
  445. package com.example.adm.myapplication;
  446.  
  447. import android.content.Context;
  448. import android.content.SharedPreferences;
  449. import android.renderscript.Sampler;
  450. import android.text.Editable;
  451. import android.util.Log;
  452.  
  453. import java.util.jar.Attributes;
  454.  
  455. /**
  456.  * Created by ADM on 8/26/2016.
  457.  */
  458. public class utlShared {
  459.     //context to use later
  460.     Context context;
  461.     //declatrtion of shared preferences object
  462.     private SharedPreferences userPref;
  463.     //declaration of shared preferences editor
  464.     private SharedPreferences.Editor editor;
  465.  
  466.     public utlShared() {}
  467.  
  468.     public utlShared(Context context)
  469.     {
  470.         //get context to use it
  471.         this.context=context;
  472.         //declaretion of shared preferences with file name and file mode (private,public)
  473.         userPref=context.getSharedPreferences("users",Context.MODE_PRIVATE);
  474.         //declaration of editor
  475.         editor=userPref.edit();
  476.     }
  477.  
  478.     //get user and password
  479.     public void addUser(String userName, String password)
  480.     {
  481.         //stores in the phone device under data\data\package name
  482.         //put in shared preferences user name and password
  483.         editor.putString(userName,password);
  484.         //commit (save/apply) the changes.
  485.         editor.commit();
  486.     }
  487.  
  488.     public boolean checkUser(String userName)
  489.     {
  490.         //get name by key->userName
  491.         String checkString = userPref.getString(userName,"na");
  492.  
  493.         //print to logcat a custom message.....
  494.         Log.e("checkUser", "checkUser: "+checkString );
  495.         //check if userName equals to responded data, if it's na, we don't havce the user...
  496.         return !checkString.equals("na");
  497.     }
  498.  
  499.     public boolean checkUserPassword(String userName, String userPassword)
  500.     {
  501.         String checkString = userPref.getString(userName,"na");
  502.         return checkString.equals(userPassword);
  503.     }
  504.  
  505.     public void task(String userName,String taskName,boolean taskDone)
  506.     {
  507.         //pointer to user task shared preferances
  508.         SharedPreferences taskPref=context.getSharedPreferences(userName,Context.MODE_PRIVATE);
  509.         //create editor to change the specific shared preferences
  510.         SharedPreferences.Editor taskEditor=taskPref.edit();
  511.  
  512.         //add new task -> if true write 1 else write 0
  513.         taskEditor.putString(taskName,taskDone?"1":"0");
  514.         //apply the changes
  515.         taskEditor.commit();
  516.     }
  517. }
  518.  
  519. activity_main.xml
  520. ==========================================================
  521.  
  522. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  523.     android:layout_width="match_parent"
  524.     android:layout_height="match_parent"
  525.     android:orientation="vertical">
  526.  
  527.     <LinearLayout
  528.         android:layout_width="match_parent"
  529.         android:layout_height="150dp"
  530.         android:orientation="vertical">
  531.  
  532.         <TextView
  533.             android:layout_width="match_parent"
  534.             android:layout_height="match_parent"
  535.             android:gravity="center"
  536.             android:text="@string/myLogo"
  537.             android:textSize="50sp">
  538.  
  539.         </TextView>
  540.     </LinearLayout>
  541.  
  542.     <LinearLayout
  543.         android:layout_width="match_parent"
  544.         android:layout_height="100dp"
  545.         android:orientation="vertical">
  546.  
  547.         <EditText
  548.             android:id="@+id/txtUserName"
  549.             android:layout_width="match_parent"
  550.             android:layout_height="wrap_content"
  551.             android:hint="@string/user_name"
  552.             android:gravity="center"
  553.             android:inputType="text"
  554.             android:textSize="22sp" />
  555.  
  556.         <EditText
  557.             android:id="@+id/txtUserPassword"
  558.             android:layout_width="match_parent"
  559.             android:layout_height="wrap_content"
  560.             android:hint="@string/password1"
  561.             android:gravity="center"
  562.             android:inputType="textPassword"
  563.             android:textSize="22sp" />
  564.     </LinearLayout>
  565.  
  566.     <LinearLayout
  567.         android:layout_width="match_parent"
  568.         android:layout_height="150dp"
  569.         android:orientation="vertical">
  570.  
  571.         <Button
  572.             android:layout_width="match_parent"
  573.             android:layout_height="wrap_content"
  574.             android:text="@string/login"
  575.             android:background="#00BFFF"
  576.             android:textColor="#ffffff"
  577.             android:textSize="32sp"
  578.             android:id="@+id/btnLogin"
  579.             android:layout_marginBottom="20dp"/>
  580.  
  581.         <Button
  582.             android:layout_width="match_parent"
  583.             android:layout_height="wrap_content"
  584.             android:text="@string/register"
  585.             android:background="#00BFFF"
  586.             android:textColor="#ffffff"
  587.             android:textSize="32sp"
  588.             android:id="@+id/btnRegister"/>
  589.     </LinearLayout>
  590.  
  591.     <LinearLayout
  592.         android:layout_width="match_parent"
  593.         android:layout_height="match_parent"
  594.         android:orientation="vertical">
  595.         <TextView
  596.             android:layout_width="match_parent"
  597.             android:layout_height="match_parent"
  598.             android:textSize="32sp"
  599.             android:text="@string/my_login_system"
  600.             android:gravity="center"
  601.             android:id="@+id/lblMsg"/>
  602.     </LinearLayout>
  603. </LinearLayout>
  604.  
  605.  
  606. activity_welcom.xml
  607. ===================================================
  608.  
  609. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  610.     android:layout_width="match_parent"
  611.     android:layout_height="match_parent"
  612.     android:orientation="vertical"
  613.     >
  614.  
  615.  
  616.     <Button android:layout_width="match_parent"
  617.         android:layout_height="wrap_content"
  618.         android:text="@string/addtask"
  619.         android:onClick="addCustomTask"
  620.  
  621.         />
  622.  
  623.     <ListView
  624.         android:layout_width="match_parent"
  625.         android:layout_height="match_parent"
  626.         android:id="@+id/taskList"
  627.         />
  628. </LinearLayout>
  629.  
  630.  
  631. dlg_new_task.xml
  632. ==================================================================
  633.  
  634. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  635.     android:layout_width="match_parent"
  636.     android:layout_height="wrap_content"
  637.     android:orientation="vertical"
  638.     android:gravity="center">
  639.  
  640.     <ImageView
  641.         android:layout_width="100dp"
  642.         android:layout_height="100dp"
  643.         android:src="@drawable/task"/>
  644.  
  645.     <EditText
  646.     android:layout_width="200dp"
  647.     android:layout_height="wrap_content"
  648.     android:hint="@string/user_name"
  649.     android:id="@+id/txtUserName"/>
  650.  
  651.     <EditText
  652.     android:layout_width="200dp"
  653.     android:layout_height="wrap_content"
  654.     android:hint="@string/password1"
  655.     android:id="@+id/txtPassword"/>
  656.  
  657.     <EditText
  658.         android:layout_width="200dp"
  659.         android:layout_height="wrap_content"
  660.         android:hint="@string/password2"
  661.         android:id="@+id/txtPassword2"/>
  662. </LinearLayout>
  663.  
  664.  
  665. task_item.xml
  666. ==============================================================================================
  667.  
  668.  
  669. <?xml version="1.0" encoding="utf-8"?>
  670. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  671.     android:layout_width="match_parent"
  672.     android:layout_height="50dp"
  673.     android:orientation="horizontal"
  674.     android:layoutDirection="rtl"
  675.     android:layout_margin="20dp"
  676.     >
  677.  
  678.     <Switch
  679.         android:layout_width="40dp"
  680.         android:layout_height="wrap_content"
  681.         android:id="@+id/taskDone"
  682.         />
  683.     <TextView
  684.         android:layout_width="match_parent"
  685.         android:layout_height="wrap_content"
  686.         android:textSize="22sp"
  687.         android:id="@+id/taskName"
  688.         android:text="EXAMPLE FOR TASK"
  689.         />
  690. </LinearLayout>
  691.  
  692.  
  693. weed.xml
  694. =======================================================================================
  695.  
  696. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  697.     android:layout_width="match_parent"
  698.     android:layout_height="wrap_content"
  699.     android:orientation="vertical"
  700.     android:gravity="center">
  701.  
  702.     <ImageView
  703.         android:layout_width="100dp"
  704.         android:layout_height="100dp"
  705.         android:src="@drawable/task"/>
  706.  
  707.     <EditText
  708.         android:layout_width="match_parent"
  709.         android:layout_height="wrap_content"
  710.         android:hint="@string/addtask"
  711.         android:id="@+id/txtTask"/>
  712. </LinearLayout>
  713.  
  714.  
  715. strings.xml
  716. =========================================================
  717.  
  718.  
  719. <resources>
  720.     <string name="app_name"> האפלקציה שלי </string>
  721.     <string name="user_name"> שם משתמש </string>
  722.     <string name="password1"> סיסמה </string>
  723.     <string name="password2">   סימסה עוד פעם</string>
  724.     <string name="register">  הרשמה </string>
  725.     <string name="login"> כניסה </string>
  726.     <string name="cancel"> חזרה </string>
  727.     <string name="regist_accept"> נרשמת בהצלחה </string>
  728.     <string name="welcome"> ברוך הבא </string>
  729.     <string name="myLogo"> הלוגו שלי </string>
  730.     <string name="my_login_system"> מערכת הרשמה שלי </string>
  731.     <string name="user_not_found"> משתמש לא נמצא </string>
  732.     <string name="wantToRegist"> רוצה להירשם </string>
  733.     <string name="tryAgain">  נסה שוב </string>
  734.     <string name="errorSamepass"> סיסמאות לא זהות </string>
  735.     <string name="userExixst"> משתמש קיים </string>
  736.     <string name="userLoged"> משתמש נכנס </string>
  737.     <string name="blocked"> נחסמת </string>
  738.     <string name="wrongpass"> סיסמה שגויה </string>
  739.     <string name="addnewtask"> הוספ משימה חדשה </string>
  740.     <string name="addtask"> הוסף משימה </string>
  741.     <string name="taskis"> משימה היא </string>
  742.     <string name="taskdone"> משימה בוצעה </string>
  743.     <string name="taskUndone"> משיצה לא בומעה </string>
  744. </resources>
  745.  
  746.  
  747. AndroidManifests.xml
  748. =======================================================================================
  749.  
  750. <?xml version="1.0" encoding="utf-8"?>
  751. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  752.     package="com.example.adm.myapplication">
  753.  
  754.     <application
  755.         android:allowBackup="true"
  756.         android:icon="@mipmap/ic_launcher"
  757.         android:label="@string/app_name"
  758.         android:supportsRtl="true"
  759.         android:theme="@style/AppTheme">
  760.         <activity android:name=".MainActivity">
  761.             <intent-filter>
  762.                 <action android:name="android.intent.action.MAIN" />
  763.  
  764.                 <category android:name="android.intent.category.LAUNCHER" />
  765.             </intent-filter>
  766.         </activity>
  767.         <activity android:name=".Welcom" />
  768.         <!-- ATTENTION: This was auto-generated to add Google Play services to your project for
  769.      App Indexing.  See https://g.co/AppIndexing/AndroidStudio for more information. -->
  770.         <meta-data
  771.             android:name="com.google.android.gms.version"
  772.             android:value="@integer/google_play_services_version" />
  773.     </application>
  774.  
  775. </manifest>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement