Advertisement
cristi9512

Untitled

Mar 24th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.80 KB | None | 0 0
  1. /// SaveInfoApi
  2.  
  3. package com.example.cristinica.foodhelper.apiConnector;
  4.  
  5. import android.util.Log;
  6.  
  7. import org.json.JSONObject;
  8.  
  9. import java.io.BufferedReader;
  10. import java.io.InputStreamReader;
  11. import java.io.OutputStreamWriter;
  12. import java.net.HttpURLConnection;
  13. import java.net.URL;
  14.  
  15. /**
  16. * Created by cristi.nica on 3/24/2018.
  17. */
  18.  
  19. public class SaveInfoApi {
  20.  
  21. public static String apiURL = "http://10.81.130.112/register.php";
  22.  
  23. public static String saveInfo(String email, String newMail, String name, String reprezentant, String phone, String address) {
  24. HttpURLConnection connection = null;
  25.  
  26. try {
  27. URL url = new URL(apiURL);
  28. JSONObject postDataParams = new JSONObject();
  29. postDataParams.put("email", email);
  30. postDataParams.put("email_nou", newMail);
  31. postDataParams.put("nume_companie", name);
  32. postDataParams.put("telefon", phone);
  33. postDataParams.put("adresa", address);
  34. postDataParams.put("nume_reprezentant", reprezentant);
  35.  
  36.  
  37. connection = (HttpURLConnection) url.openConnection();
  38. connection.setReadTimeout(15000);
  39. connection.setConnectTimeout(15000);
  40. connection.setRequestMethod("POST");
  41. connection.setRequestProperty("Content-Type",
  42. "application/json");
  43. connection.setDoInput(true);
  44. connection.setDoOutput(true);
  45. OutputStreamWriter out = new OutputStreamWriter(connection.getOutputStream());
  46. out.write(postDataParams.toString());
  47. out.close();
  48. StringBuilder sb = new StringBuilder();
  49. sb.append("");
  50. int HttpResult = connection.getResponseCode();
  51. if (HttpResult == HttpURLConnection.HTTP_OK) {
  52. BufferedReader br = new BufferedReader(new InputStreamReader(
  53. connection.getInputStream(), "utf-8"));
  54. String line = null;
  55. while ((line = br.readLine()) != null) {
  56. sb.append(line + "\n");
  57. }
  58. br.close();
  59. } else {
  60. System.out.println(connection.getResponseMessage());
  61. }
  62. return sb.toString();
  63. } catch (Exception e) {
  64. return new String("Exception: " + e.getMessage());
  65. } finally {
  66. connection.disconnect();
  67. }
  68. }
  69. }
  70.  
  71.  
  72.  
  73. //// Login
  74.  
  75. package com.example.cristinica.foodhelper;
  76.  
  77. import android.annotation.SuppressLint;
  78. import android.content.Context;
  79. import android.content.Intent;
  80. import android.content.SharedPreferences;
  81. import android.os.AsyncTask;
  82. import android.support.v7.app.AppCompatActivity;
  83. import android.os.Bundle;
  84. import android.util.Log;
  85. import android.view.View;
  86. import android.widget.Button;
  87. import android.widget.EditText;
  88. import android.widget.Toast;
  89.  
  90.  
  91. import com.example.cristinica.foodhelper.apiConnector.LoginApi;
  92. import com.example.cristinica.foodhelper.models.LoginModel;
  93. import com.example.cristinica.foodhelper.models.RegisterModel;
  94. import com.google.gson.Gson;
  95. import com.google.gson.reflect.TypeToken;
  96.  
  97. import java.util.ArrayList;
  98.  
  99. public class Login extends AppCompatActivity {
  100.  
  101. Button goToRegister;
  102.  
  103. @Override
  104. protected void onCreate(Bundle savedInstanceState) {
  105. super.onCreate(savedInstanceState);
  106. setContentView(R.layout.activity_login);
  107.  
  108. goToRegister = findViewById(R.id.goToRegister);
  109.  
  110. goToRegister.setOnClickListener(new View.OnClickListener() {
  111. @Override
  112. public void onClick(View view) {
  113. Intent intent = new Intent(Login.this, Register.class);
  114. startActivity(intent);
  115.  
  116. }
  117. });
  118.  
  119. final EditText companyMail = findViewById(R.id.email_login);
  120. final EditText pass = findViewById(R.id.password_login);
  121.  
  122. Button register = findViewById(R.id.register2);
  123. final SharedPreferences sharedPreferences = Login.this.getSharedPreferences("type", Context
  124. .MODE_PRIVATE);
  125. //final SharedPreferences.Editor editor = sharedPreferences.edit();
  126. final int type = sharedPreferences.getInt("type", -1);
  127. Button login = findViewById(R.id.login2);
  128.  
  129. if (type == 0) {
  130. login.setBackgroundDrawable(getResources().getDrawable(R.drawable.round));
  131. goToRegister.setBackgroundDrawable(getResources().getDrawable(R.drawable.round));
  132.  
  133. } else if (type == 1) {
  134. login.setBackgroundDrawable(getResources().getDrawable(R.drawable.round2));
  135. goToRegister.setBackgroundDrawable(getResources().getDrawable(R.drawable.round2));
  136. } else {
  137. Log.v("da", "daaaa2");
  138. }
  139.  
  140.  
  141. login.setOnClickListener(new View.OnClickListener() {
  142. @Override
  143. public void onClick(View view) {
  144. @SuppressLint("StaticFieldLeak") AsyncTask<Void, Void, Void> task = new AsyncTask<Void, Void, Void>() {
  145. LoginModel loginModel = new LoginModel();
  146. String s;
  147. @Override
  148. protected Void doInBackground(Void... params) {
  149. s = LoginApi.login(companyMail.getText().toString(), pass.getText().toString());
  150. Log.v("primit", s);
  151. Gson g = new Gson();
  152. loginModel = g.fromJson(s, LoginModel.class);
  153. return null;
  154. }
  155.  
  156. @SuppressLint("ShowToast")
  157. protected void onPostExecute(Void param) {
  158. if (loginModel.status.equals("ok")) {
  159. final SharedPreferences sharedPreferences3 = Login.this.getSharedPreferences("user", Context.MODE_PRIVATE);
  160. SharedPreferences.Editor editorUser = sharedPreferences3.edit();
  161. editorUser.putString("user", s);
  162. editorUser.apply();
  163.  
  164. if (type == 0) {
  165. SharedPreferences sharedPreferences2 = Login.this.getSharedPreferences("logged", Context
  166. .MODE_PRIVATE);
  167. SharedPreferences.Editor editor2 = sharedPreferences2.edit();
  168. editor2.putInt("logged", 1);
  169. editor2.apply();
  170.  
  171. Intent intent = new Intent(Login.this, GiverActivity.class);
  172. intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
  173. startActivity(intent);
  174. }
  175. if (type == 1) {
  176. SharedPreferences sharedPreferences2 = Login.this.getSharedPreferences("logged", Context
  177. .MODE_PRIVATE);
  178. SharedPreferences.Editor editor2 = sharedPreferences2.edit();
  179. editor2.putInt("logged", 1);
  180. editor2.apply();
  181.  
  182. Intent intent = new Intent(Login.this, ReceiverActivity.class);
  183. intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
  184. startActivity(intent);
  185. }
  186. } else {
  187. Toast.makeText(getApplicationContext(), "Login failed", Toast.LENGTH_SHORT);
  188. }
  189. }
  190.  
  191. };
  192. task.execute();
  193. }
  194. });
  195.  
  196. }
  197.  
  198. }
  199.  
  200.  
  201. //// MainActivity
  202.  
  203. package com.example.cristinica.foodhelper;
  204.  
  205.  
  206. import android.content.Context;
  207. import android.content.Intent;
  208. import android.content.SharedPreferences;
  209. import android.support.v7.app.AppCompatActivity;
  210. import android.os.Bundle;
  211. import android.view.View;
  212. import android.widget.RelativeLayout;
  213.  
  214. public class MainActivity extends AppCompatActivity {
  215.  
  216. @Override
  217. protected void onCreate(Bundle savedInstanceState) {
  218. super.onCreate(savedInstanceState);
  219. setContentView(R.layout.activity_main);
  220.  
  221. RelativeLayout help = findViewById(R.id.share_food);
  222. RelativeLayout need = findViewById(R.id.need_food);
  223. SharedPreferences sharedPreferences = MainActivity.this.getSharedPreferences("type", Context
  224. .MODE_PRIVATE);
  225. final SharedPreferences.Editor editor = sharedPreferences.edit();
  226.  
  227. SharedPreferences sharedPreferences2 = MainActivity.this.getSharedPreferences("logged", Context
  228. .MODE_PRIVATE);
  229. int logged = sharedPreferences2.getInt("logged", -1);
  230. int type = sharedPreferences.getInt("type", -1);
  231. if (logged == 1 && type == 0) {
  232. Intent intent = new Intent(MainActivity.this, GiverActivity.class);
  233. intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
  234. startActivity(intent);
  235. } else if (logged == 1 && type == 1) {
  236. Intent intent = new Intent(MainActivity.this, ReceiverActivity.class);
  237. intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
  238. startActivity(intent);
  239. }
  240. //companie
  241. help.setOnClickListener(new View.OnClickListener() {
  242. @Override
  243. public void onClick(View view) {
  244. editor.putInt("type", 0);
  245. editor.apply();
  246. Intent intent = new Intent(MainActivity.this, Login.class);
  247. startActivity(intent);
  248. }
  249. });
  250. //azil
  251. need.setOnClickListener(new View.OnClickListener() {
  252. @Override
  253. public void onClick(View view) {
  254. editor.putInt("type", 1);
  255. editor.apply();
  256. Intent intent = new Intent(MainActivity.this, Login.class);
  257. startActivity(intent);
  258. }
  259. });
  260. }
  261. }
  262.  
  263.  
  264.  
  265.  
  266. ///// SettingsActivity
  267.  
  268.  
  269. package com.example.cristinica.foodhelper;
  270.  
  271. import android.annotation.SuppressLint;
  272. import android.content.Context;
  273. import android.content.Intent;
  274. import android.content.SharedPreferences;
  275. import android.os.AsyncTask;
  276. import android.support.v7.app.AppCompatActivity;
  277. import android.os.Bundle;
  278. import android.util.Log;
  279. import android.view.View;
  280. import android.widget.Button;
  281. import android.widget.TextView;
  282.  
  283. import com.example.cristinica.foodhelper.apiConnector.RegisterApi;
  284. import com.example.cristinica.foodhelper.apiConnector.SaveInfoApi;
  285. import com.example.cristinica.foodhelper.models.LoginModel;
  286. import com.example.cristinica.foodhelper.models.RegisterModel;
  287. import com.google.gson.Gson;
  288.  
  289. public class SettingsActivity extends AppCompatActivity {
  290.  
  291.  
  292. @Override
  293. protected void onCreate(Bundle savedInstanceState) {
  294. super.onCreate(savedInstanceState);
  295. setContentView(R.layout.activity_settings);
  296. Button logout = findViewById(R.id.logout);
  297.  
  298. final SharedPreferences sharedPreferences = SettingsActivity.this.getSharedPreferences("user", Context.MODE_PRIVATE);
  299.  
  300. final TextView name = findViewById(R.id.editText2);
  301. final TextView email = findViewById(R.id.editText3);
  302. final TextView address = findViewById(R.id.editText5);
  303. final TextView phone = findViewById(R.id.editText4);
  304. final TextView reprezentant = findViewById(R.id.editText6);
  305. final LoginModel loginModel;
  306. Gson g = new Gson();
  307. loginModel = g.fromJson(sharedPreferences.getString("user", ""), LoginModel.class);
  308.  
  309. if (loginModel.nume != null)
  310. name.setText(loginModel.nume);
  311. if (loginModel.email != null)
  312. email.setText(loginModel.email);
  313. if (loginModel.adresa != null)
  314. address.setText(loginModel.adresa);
  315. if (loginModel.telefon != null)
  316. phone.setText(loginModel.telefon);
  317. if (loginModel.nume_reprezentant != null)
  318. reprezentant.setText(loginModel.nume_reprezentant);
  319.  
  320.  
  321. SharedPreferences sharedPreferences2 = SettingsActivity.this.getSharedPreferences("type", Context
  322. .MODE_PRIVATE);
  323. int type = sharedPreferences2.getInt("type", 1);
  324. if (type == 0) {
  325. logout.setBackgroundDrawable(getResources().getDrawable(R.drawable.round));
  326. } else if (type == 1) {
  327. logout.setBackgroundDrawable(getResources().getDrawable(R.drawable.round2));
  328. }
  329.  
  330.  
  331. logout.setOnClickListener(new View.OnClickListener() {
  332. @Override
  333. public void onClick(View view) {
  334. SharedPreferences sharedPreferences2 = SettingsActivity.this.getSharedPreferences("logged", Context
  335. .MODE_PRIVATE);
  336. SharedPreferences.Editor editor = sharedPreferences2.edit();
  337. editor.putInt("logged", 0);
  338. editor.apply();
  339. Intent intent = new Intent(SettingsActivity.this, MainActivity.class);
  340. intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
  341. startActivity(intent);
  342. }
  343. });
  344.  
  345.  
  346. Button save = findViewById(R.id.save);
  347. if (type == 0) {
  348. save.setBackgroundDrawable(getResources().getDrawable(R.drawable.round));
  349. } else if (type == 1) {
  350. save.setBackgroundDrawable(getResources().getDrawable(R.drawable.round2));
  351. }
  352. save.setOnClickListener(new View.OnClickListener() {
  353. @Override
  354. public void onClick(View view) {
  355. @SuppressLint("StaticFieldLeak") AsyncTask<Void, Void, Void> task = new AsyncTask<Void, Void, Void>() {
  356. RegisterModel registerModel = new RegisterModel();
  357.  
  358. @Override
  359. protected Void doInBackground(Void... params) {
  360. String s = SaveInfoApi.saveInfo(loginModel.email, email.getText().toString(), name.getText().toString(),
  361. reprezentant.getText().toString(), phone.getText().toString(), address.getText().toString());
  362. Log.v("am primit", s);
  363. Gson g = new Gson();
  364. registerModel = g.fromJson(s, RegisterModel.class);
  365. return null;
  366. }
  367.  
  368. protected void onPostExecute(Void param) {
  369.  
  370. }
  371.  
  372. };
  373. task.execute();
  374. finish();
  375. }
  376. });
  377.  
  378.  
  379. }
  380. }
  381.  
  382.  
  383.  
  384.  
  385. //// Acitivity_receiver.xml
  386.  
  387. <?xml version="1.0" encoding="utf-8"?>
  388. <android.support.v4.widget.DrawerLayout
  389. xmlns:android="http://schemas.android.com/apk/res/android"
  390. xmlns:app="http://schemas.android.com/apk/res-auto"
  391. xmlns:tools="http://schemas.android.com/tools"
  392. android:layout_width="match_parent"
  393. android:layout_height="match_parent"
  394. android:fitsSystemWindows="true"
  395. tools:openDrawer="start">
  396.  
  397.  
  398.  
  399. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  400. xmlns:tools="http://schemas.android.com/tools"
  401. android:layout_width="match_parent"
  402. android:layout_height="match_parent"
  403. android:orientation="vertical"
  404. android:isScrollContainer="true"
  405. android:id="@+id/home">
  406.  
  407.  
  408. <com.example.cristinica.foodhelper.SlidingTabLayout
  409. android:id="@+id/tabsHome"
  410. android:layout_width="match_parent"
  411. android:layout_height="45dp"
  412. android:paddingTop="5dp"
  413. android:paddingBottom="5dp"
  414. android:background="@color/colorPrimary"
  415. app:tabMode="scrollable"
  416. />
  417.  
  418. <android.support.v4.view.ViewPager
  419. android:id="@+id/view_pagerHome"
  420. android:layout_height="match_parent"
  421. android:layout_width="match_parent"
  422. android:layout_weight="1">
  423.  
  424. </android.support.v4.view.ViewPager>
  425.  
  426. </LinearLayout>
  427.  
  428.  
  429.  
  430.  
  431.  
  432. </android.support.v4.widget.DrawerLayout>
  433.  
  434.  
  435.  
  436. ////// Activity Settings XML
  437.  
  438. <?xml version="1.0" encoding="utf-8"?>
  439. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  440. xmlns:app="http://schemas.android.com/apk/res-auto"
  441. xmlns:tools="http://schemas.android.com/tools"
  442. android:layout_width="match_parent"
  443. android:layout_height="match_parent"
  444. android:textAlignment="center"
  445. tools:context="com.example.cristinica.foodhelper.SettingsActivity">
  446.  
  447. <TextView
  448. android:id="@+id/editText"
  449. android:layout_width="wrap_content"
  450. android:layout_height="wrap_content"
  451. android:layout_alignParentTop="true"
  452. android:layout_centerHorizontal="true"
  453. android:layout_centerInParent="true"
  454. android:layout_centerVertical="true"
  455. android:layout_marginTop="14dp"
  456. android:textSize="20sp"
  457. android:ems="10"
  458. android:text="Tell more about you"
  459. android:textAlignment="center" />
  460.  
  461. <RelativeLayout
  462. android:id="@+id/companyName"
  463. android:layout_width="match_parent"
  464. android:layout_height="50dp"
  465. android:layout_alignParentLeft="true"
  466. android:layout_alignParentStart="true"
  467. android:layout_below="@+id/editText"
  468. android:layout_marginLeft="10dp"
  469. android:layout_marginRight="10dp"
  470. android:layout_marginTop="11dp">
  471.  
  472. <ImageView
  473. android:id="@+id/imageView"
  474. android:layout_width="wrap_content"
  475. android:layout_height="wrap_content"
  476. android:layout_alignParentLeft="true"
  477. android:layout_alignParentStart="true"
  478. android:layout_centerVertical="true"
  479. android:layout_marginLeft="18dp"
  480. android:layout_marginStart="18dp"
  481. app:srcCompat="@drawable/user_name" />
  482.  
  483. <EditText
  484. android:id="@+id/editText2"
  485. android:layout_width="wrap_content"
  486. android:layout_height="wrap_content"
  487. android:layout_alignParentBottom="true"
  488. android:layout_marginLeft="13dp"
  489. android:layout_marginStart="13dp"
  490. android:layout_toEndOf="@+id/imageView"
  491. android:layout_toRightOf="@+id/imageView"
  492. android:ems="10"
  493. android:inputType="textPersonName"
  494. android:hint="Nume" />
  495. </RelativeLayout>
  496.  
  497.  
  498. <RelativeLayout
  499. android:id="@+id/email"
  500. android:layout_width="match_parent"
  501. android:layout_height="50dp"
  502. android:layout_alignParentLeft="true"
  503. android:layout_alignParentStart="true"
  504. android:layout_below="@+id/companyName"
  505. android:layout_marginLeft="10dp"
  506. android:layout_marginRight="10dp"
  507. android:layout_marginTop="11dp">
  508.  
  509. <ImageView
  510. android:id="@+id/imageView2"
  511. android:layout_width="wrap_content"
  512. android:layout_height="wrap_content"
  513. android:layout_alignParentLeft="true"
  514. android:layout_alignParentStart="true"
  515. android:layout_centerVertical="true"
  516. android:layout_marginLeft="18dp"
  517. android:layout_marginStart="18dp"
  518. app:srcCompat="@drawable/envelope" />
  519.  
  520. <EditText
  521. android:id="@+id/editText3"
  522. android:layout_width="wrap_content"
  523. android:layout_height="wrap_content"
  524. android:layout_alignParentBottom="true"
  525. android:layout_marginLeft="13dp"
  526. android:layout_marginStart="13dp"
  527. android:layout_toEndOf="@+id/imageView2"
  528. android:layout_toRightOf="@+id/imageView2"
  529. android:ems="10"
  530. android:inputType="textPersonName"
  531. android:hint="Email" />
  532. </RelativeLayout>
  533.  
  534. <RelativeLayout
  535. android:id="@+id/address"
  536. android:layout_width="match_parent"
  537. android:layout_height="50dp"
  538. android:layout_alignParentLeft="true"
  539. android:layout_alignParentStart="true"
  540. android:layout_below="@+id/email"
  541. android:layout_marginLeft="10dp"
  542. android:layout_marginRight="10dp"
  543. android:layout_marginTop="11dp">
  544.  
  545. <ImageView
  546. android:id="@+id/imageView4"
  547. android:layout_width="wrap_content"
  548. android:layout_height="wrap_content"
  549. android:layout_alignParentLeft="true"
  550. android:layout_alignParentStart="true"
  551. android:layout_centerVertical="true"
  552. android:layout_marginLeft="18dp"
  553. android:layout_marginStart="18dp"
  554. app:srcCompat="@drawable/placeholder" />
  555.  
  556. <EditText
  557. android:id="@+id/editText5"
  558. android:layout_width="wrap_content"
  559. android:layout_height="wrap_content"
  560. android:layout_alignParentBottom="true"
  561. android:layout_marginLeft="13dp"
  562. android:layout_marginStart="13dp"
  563. android:layout_toEndOf="@+id/imageView4"
  564. android:layout_toRightOf="@+id/imageView4"
  565. android:ems="10"
  566. android:inputType="textPersonName"
  567. android:hint="Adresa" />
  568. </RelativeLayout>
  569.  
  570. <RelativeLayout
  571. android:id="@+id/phone"
  572. android:layout_width="match_parent"
  573. android:layout_height="50dp"
  574. android:layout_alignParentLeft="true"
  575. android:layout_alignParentStart="true"
  576. android:layout_below="@+id/address"
  577. android:layout_marginLeft="10dp"
  578. android:layout_marginRight="10dp"
  579. android:layout_marginTop="11dp">
  580.  
  581. <ImageView
  582. android:id="@+id/imageView3"
  583. android:layout_width="wrap_content"
  584. android:layout_height="wrap_content"
  585. android:layout_alignParentLeft="true"
  586. android:layout_alignParentStart="true"
  587. android:layout_centerVertical="true"
  588. android:layout_marginLeft="18dp"
  589. android:layout_marginStart="18dp"
  590. app:srcCompat="@drawable/smartphone_call" />
  591.  
  592. <EditText
  593. android:id="@+id/editText4"
  594. android:layout_width="wrap_content"
  595. android:layout_height="wrap_content"
  596. android:layout_alignParentBottom="true"
  597. android:layout_marginLeft="13dp"
  598. android:layout_marginStart="13dp"
  599. android:layout_toEndOf="@+id/imageView3"
  600. android:layout_toRightOf="@+id/imageView3"
  601. android:ems="10"
  602. android:inputType="textPersonName"
  603. android:hint="Numar de telefon" />
  604. </RelativeLayout>
  605.  
  606. <RelativeLayout
  607. android:id="@+id/reprezentant"
  608. android:layout_width="match_parent"
  609. android:layout_height="50dp"
  610. android:layout_alignParentLeft="true"
  611. android:layout_alignParentStart="true"
  612. android:layout_below="@+id/phone"
  613. android:layout_marginLeft="10dp"
  614. android:layout_marginRight="10dp"
  615. android:layout_marginTop="11dp">
  616.  
  617. <ImageView
  618. android:id="@+id/imageView6"
  619. android:layout_width="wrap_content"
  620. android:layout_height="wrap_content"
  621. android:layout_alignParentLeft="true"
  622. android:layout_alignParentStart="true"
  623. android:layout_centerVertical="true"
  624. android:layout_marginLeft="18dp"
  625. android:layout_marginStart="18dp"
  626. app:srcCompat="@drawable/user_name" />
  627.  
  628. <EditText
  629. android:id="@+id/editText6"
  630. android:layout_width="wrap_content"
  631. android:layout_height="wrap_content"
  632. android:layout_alignParentBottom="true"
  633. android:layout_marginLeft="13dp"
  634. android:layout_marginStart="13dp"
  635. android:layout_toEndOf="@+id/imageView6"
  636. android:layout_toRightOf="@+id/imageView6"
  637. android:ems="10"
  638. android:inputType="textPersonName"
  639. android:hint="Nume Reprezentant" />
  640. </RelativeLayout>
  641.  
  642. <Button
  643. android:id="@+id/logout"
  644. android:layout_width="wrap_content"
  645. android:layout_height="wrap_content"
  646. android:layout_alignParentBottom="true"
  647. android:layout_centerHorizontal="true"
  648. android:layout_marginBottom="36dp"
  649. android:text="Logout" />
  650.  
  651. <Button
  652. android:id="@+id/save"
  653. android:layout_width="wrap_content"
  654. android:layout_height="wrap_content"
  655. android:layout_alignEnd="@+id/logout"
  656. android:layout_alignRight="@+id/logout"
  657. android:layout_below="@+id/reprezentant"
  658. android:layout_marginTop="11dp"
  659. android:text="Save" />
  660.  
  661. </RelativeLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement