Compare commits
3 Commits
944ad6b562
...
cb2272d636
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb2272d636 | ||
|
|
c77d5e8deb | ||
|
|
9138820ea1 |
@ -0,0 +1,16 @@
|
|||||||
|
package fr.romanet.vj.apps.myrealestateagency.dao;
|
||||||
|
|
||||||
|
import androidx.lifecycle.LiveData;
|
||||||
|
import androidx.room.Dao;
|
||||||
|
import androidx.room.Query;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import fr.romanet.vj.apps.myrealestateagency.entities.Modified;
|
||||||
|
|
||||||
|
@Dao
|
||||||
|
public interface ModifiedDao {
|
||||||
|
|
||||||
|
@Query("SELECT * FROM modified")
|
||||||
|
LiveData<List<Modified>> getModifiedList();
|
||||||
|
}
|
||||||
@ -15,15 +15,18 @@ import fr.romanet.vj.apps.myrealestateagency.dao.AgencyDao;
|
|||||||
import fr.romanet.vj.apps.myrealestateagency.dao.AgencyWithAgentsDao;
|
import fr.romanet.vj.apps.myrealestateagency.dao.AgencyWithAgentsDao;
|
||||||
import fr.romanet.vj.apps.myrealestateagency.dao.AgencyWithPropertiesDao;
|
import fr.romanet.vj.apps.myrealestateagency.dao.AgencyWithPropertiesDao;
|
||||||
import fr.romanet.vj.apps.myrealestateagency.dao.DollarCurrencyDao;
|
import fr.romanet.vj.apps.myrealestateagency.dao.DollarCurrencyDao;
|
||||||
|
import fr.romanet.vj.apps.myrealestateagency.dao.ModifiedDao;
|
||||||
import fr.romanet.vj.apps.myrealestateagency.dao.PropertyDao;
|
import fr.romanet.vj.apps.myrealestateagency.dao.PropertyDao;
|
||||||
import fr.romanet.vj.apps.myrealestateagency.entities.Agency;
|
import fr.romanet.vj.apps.myrealestateagency.entities.Agency;
|
||||||
import fr.romanet.vj.apps.myrealestateagency.entities.Agent;
|
import fr.romanet.vj.apps.myrealestateagency.entities.Agent;
|
||||||
import fr.romanet.vj.apps.myrealestateagency.dao.AgentDao;
|
import fr.romanet.vj.apps.myrealestateagency.dao.AgentDao;
|
||||||
|
import fr.romanet.vj.apps.myrealestateagency.entities.Converters;
|
||||||
import fr.romanet.vj.apps.myrealestateagency.entities.DollarCurrency;
|
import fr.romanet.vj.apps.myrealestateagency.entities.DollarCurrency;
|
||||||
|
import fr.romanet.vj.apps.myrealestateagency.entities.Modified;
|
||||||
import fr.romanet.vj.apps.myrealestateagency.entities.Property;
|
import fr.romanet.vj.apps.myrealestateagency.entities.Property;
|
||||||
|
|
||||||
@Database(entities = {Agency.class, Agent.class, Property.class, DollarCurrency.class}, version = 2, exportSchema = false)
|
@Database(entities = {Agency.class, Agent.class, Property.class, DollarCurrency.class, Modified.class}, version = 2, exportSchema = false)
|
||||||
@TypeConverters({Property.Converters.class})
|
@TypeConverters({Converters.class})
|
||||||
public abstract class RealEstateAgencyDatabase extends RoomDatabase {
|
public abstract class RealEstateAgencyDatabase extends RoomDatabase {
|
||||||
|
|
||||||
public abstract AgentDao agentDao();
|
public abstract AgentDao agentDao();
|
||||||
@ -32,6 +35,7 @@ public abstract class RealEstateAgencyDatabase extends RoomDatabase {
|
|||||||
public abstract AgencyWithAgentsDao agencyWithAgentsDao();
|
public abstract AgencyWithAgentsDao agencyWithAgentsDao();
|
||||||
public abstract AgencyWithPropertiesDao agencyWithPropertiesDaoDao();
|
public abstract AgencyWithPropertiesDao agencyWithPropertiesDaoDao();
|
||||||
public abstract DollarCurrencyDao dollarCurrencyDao();
|
public abstract DollarCurrencyDao dollarCurrencyDao();
|
||||||
|
public abstract ModifiedDao modifiedDao();
|
||||||
|
|
||||||
private static RealEstateAgencyDatabase INSTANCE;
|
private static RealEstateAgencyDatabase INSTANCE;
|
||||||
|
|
||||||
|
|||||||
@ -33,8 +33,8 @@ public class Agency implements Serializable {
|
|||||||
public static Agency[] populateAgencyTable(){
|
public static Agency[] populateAgencyTable(){
|
||||||
return new Agency[]{
|
return new Agency[]{
|
||||||
new Agency("Agency of Paris"),
|
new Agency("Agency of Paris"),
|
||||||
new Agency("Agency of Marseille"),
|
new Agency("France Habitation"),
|
||||||
new Agency("France Habitation")
|
new Agency("Agency of Marseille")
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package fr.romanet.vj.apps.myrealestateagency.entities;
|
||||||
|
|
||||||
|
import androidx.room.TypeConverter;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class Converters {
|
||||||
|
|
||||||
|
@TypeConverter
|
||||||
|
public static Date toDate(Long dateLong){
|
||||||
|
return dateLong == null ? null: new Date(dateLong);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TypeConverter
|
||||||
|
public static Long fromDate(Date date){
|
||||||
|
return date == null ? null : date.getTime();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
package fr.romanet.vj.apps.myrealestateagency.entities;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.room.ColumnInfo;
|
||||||
|
import androidx.room.Entity;
|
||||||
|
import androidx.room.TypeConverters;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Entity(tableName = "modified",
|
||||||
|
primaryKeys = {"id_agent", "date_modification"})
|
||||||
|
public class Modified {
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@ColumnInfo(name = "id_agent")
|
||||||
|
private int idAgent;
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@ColumnInfo(name = "date_modification")
|
||||||
|
@TypeConverters({Converters.class})
|
||||||
|
private Date dateModification;
|
||||||
|
|
||||||
|
public Modified(@NonNull int idAgent, @NonNull Date dateModification)
|
||||||
|
{
|
||||||
|
this.idAgent = idAgent;
|
||||||
|
this.dateModification = dateModification;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
public Date getDateModification() {
|
||||||
|
return dateModification;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDateModification(@NonNull Date dateModification) {
|
||||||
|
this.dateModification = dateModification;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getIdAgent() {
|
||||||
|
return idAgent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIdAgent(int idAgent) {
|
||||||
|
this.idAgent = idAgent;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,15 +1,22 @@
|
|||||||
package fr.romanet.vj.apps.myrealestateagency.entities;
|
package fr.romanet.vj.apps.myrealestateagency.entities;
|
||||||
|
|
||||||
|
import android.location.Address;
|
||||||
|
|
||||||
import androidx.room.ColumnInfo;
|
import androidx.room.ColumnInfo;
|
||||||
import androidx.room.Embedded;
|
import androidx.room.Embedded;
|
||||||
import androidx.room.Entity;
|
import androidx.room.Entity;
|
||||||
import androidx.room.ForeignKey;
|
import androidx.room.ForeignKey;
|
||||||
import androidx.room.Index;
|
import androidx.room.Index;
|
||||||
import androidx.room.PrimaryKey;
|
import androidx.room.PrimaryKey;
|
||||||
import androidx.room.TypeConverter;
|
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.sql.Date;
|
import java.util.Date;
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
|
||||||
|
import fr.romanet.vj.apps.myrealestateagency.MyApp;
|
||||||
|
import fr.romanet.vj.apps.myrealestateagency.repository.MapsActivityRepository;
|
||||||
|
|
||||||
import static androidx.room.ForeignKey.CASCADE;
|
import static androidx.room.ForeignKey.CASCADE;
|
||||||
|
|
||||||
@ -98,25 +105,97 @@ public class Property implements Serializable {
|
|||||||
this.propertyType = propertyType;
|
this.propertyType = propertyType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Converters {
|
public static Property[] populatePropertyTable(){
|
||||||
|
Date date1 = null;
|
||||||
@TypeConverter
|
Date date2 = null;
|
||||||
public static Date toDate(Long dateLong){
|
Date date3 = null;
|
||||||
return dateLong == null ? null: new Date(dateLong);
|
Date date4 = null;
|
||||||
|
try {
|
||||||
|
date1 = new SimpleDateFormat("yyyy-MM-dd").parse("2020-10-21");
|
||||||
|
date2 = new SimpleDateFormat("yyyy-MM-dd").parse("2019-09-01");
|
||||||
|
date3 = new SimpleDateFormat("yyyy-MM-dd").parse("2018-04-11");
|
||||||
|
date4 = new SimpleDateFormat("yyyy-MM-dd").parse("2017-02-14");
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
Address address1 = null;
|
||||||
@TypeConverter
|
Double longitude1 = null;
|
||||||
public static Long fromDate(Date date){
|
Double latitude1 = null;
|
||||||
return date == null ? null : date.getTime();
|
Address address2 = null;
|
||||||
|
Double longitude2 = null;
|
||||||
|
Double latitude2 = null;
|
||||||
|
Address address3 = null;
|
||||||
|
Double longitude3 = null;
|
||||||
|
Double latitude3 = null;
|
||||||
|
Address address4 = null;
|
||||||
|
Double longitude4 = null;
|
||||||
|
Double latitude4 = null;
|
||||||
|
Address address5 = null;
|
||||||
|
Double longitude5 = null;
|
||||||
|
Double latitude5 = null;
|
||||||
|
Address address6 = null;
|
||||||
|
Double longitude6 = null;
|
||||||
|
Double latitude6 = null;
|
||||||
|
Address address7 = null;
|
||||||
|
Double longitude7 = null;
|
||||||
|
Double latitude7 = null;
|
||||||
|
Address address8 = null;
|
||||||
|
Double longitude8 = null;
|
||||||
|
Double latitude8 = null;
|
||||||
|
Address address9 = null;
|
||||||
|
Double longitude9 = null;
|
||||||
|
Double latitude9 = null;
|
||||||
|
try {
|
||||||
|
address1 = MapsActivityRepository.get_lat_long_from_address("3 rue du docteur audigier", MyApp.getContext());
|
||||||
|
longitude1 = address1.getLongitude();
|
||||||
|
latitude1 = address1.getLatitude();
|
||||||
|
address2 = MapsActivityRepository.get_lat_long_from_address("124 Rue Saint-Dominique", MyApp.getContext());
|
||||||
|
longitude2 = address2.getLongitude();
|
||||||
|
latitude2 = address2.getLatitude();
|
||||||
|
address3 = MapsActivityRepository.get_lat_long_from_address("14 Avenue de la Motte-Picquet", MyApp.getContext());
|
||||||
|
longitude3 = address3.getLongitude();
|
||||||
|
latitude3 = address3.getLatitude();
|
||||||
|
address4 = MapsActivityRepository.get_lat_long_from_address("11 Avenue du Dr François Arnaud", MyApp.getContext());
|
||||||
|
longitude4 = address4.getLongitude();
|
||||||
|
latitude4 = address4.getLatitude();
|
||||||
|
address5 = MapsActivityRepository.get_lat_long_from_address("45 Avenue de Gravelle", MyApp.getContext());
|
||||||
|
longitude5 = address5.getLongitude();
|
||||||
|
latitude5 = address5.getLatitude();
|
||||||
|
address6 = MapsActivityRepository.get_lat_long_from_address("11 Rue Jules Vallès", MyApp.getContext());
|
||||||
|
longitude6 = address6.getLongitude();
|
||||||
|
latitude6 = address6.getLatitude();
|
||||||
|
address7 = MapsActivityRepository.get_lat_long_from_address("2 Rue du Monastere", MyApp.getContext());
|
||||||
|
longitude7 = address7.getLongitude();
|
||||||
|
latitude7 = address7.getLatitude();
|
||||||
|
address8 = MapsActivityRepository.get_lat_long_from_address("392 Rue Paradis", MyApp.getContext());
|
||||||
|
longitude8 = address8.getLongitude();
|
||||||
|
latitude8 = address8.getLatitude();
|
||||||
|
address9 = MapsActivityRepository.get_lat_long_from_address("Rue François Taddei", MyApp.getContext());
|
||||||
|
longitude9 = address9.getLongitude();
|
||||||
|
latitude9 = address9.getLatitude();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public static Property[] populatePropertyTable() {
|
|
||||||
return new Property[]{
|
return new Property[]{
|
||||||
new Property("Amazing property in the best district of Le Chesnay", "3 rue du docteur audigier", 15.8, 17.8, 1,
|
|
||||||
|
new Property("Amazing property of Le Chesnay", "3 rue du docteur audigier", longitude1, latitude1, 1,
|
||||||
|
new PropertyStatue(false, null, 15.8), new PropertyType("Apartment", 3, 9.8)),
|
||||||
|
new Property("Awesome house !", "124 Rue Saint-Dominique", longitude2, latitude2, 1,
|
||||||
|
new PropertyStatue(true, date1, 15.8), new PropertyType("House", 3, 9.8)),
|
||||||
|
new Property("Incredible neighbourhood", "14 Avenue de la Motte-Picquet", longitude3, latitude3, 1,
|
||||||
|
new PropertyStatue(false, null, 15.8), new PropertyType("House", 3, 9.8)),
|
||||||
|
new Property("The place to be", "11 Avenue du Dr François Arnaud", longitude4, latitude4, 2,
|
||||||
|
new PropertyStatue(true, date2, 15.8), new PropertyType("Apartment", 3, 9.8)),
|
||||||
|
new Property("Foreigners accepted !", "45 Avenue de Gravelle", longitude5, latitude5, 2,
|
||||||
|
new PropertyStatue(false, null, 15.8), new PropertyType("House", 3, 9.8)),
|
||||||
|
new Property("Family place", "11 Rue Jules Vallès", longitude6, latitude6, 2,
|
||||||
|
new PropertyStatue(true, date3, 15.8), new PropertyType("Apartment", 3, 9.8)),
|
||||||
|
new Property("Best district in Marseille", "2 Rue du Monastere", longitude7, latitude7, 3,
|
||||||
|
new PropertyStatue(false, null, 15.8), new PropertyType("House", 3, 9.8)),
|
||||||
|
new Property("Apartment near the port", "392 Rue Paradis", longitude8, latitude8, 3,
|
||||||
|
new PropertyStatue(true, date4, 15.8), new PropertyType("Apartment", 3, 9.8)),
|
||||||
|
new Property("Near the sea", "Rue François Taddei", longitude9, latitude9, 3,
|
||||||
new PropertyStatue(false, null, 15.8), new PropertyType("Apartment", 3, 9.8))
|
new PropertyStatue(false, null, 15.8), new PropertyType("Apartment", 3, 9.8))
|
||||||
//new Property("Best appartment in Velizy-Villacoublay", "Rue de Villacoublay, 78140 Vélizy-Villacoublay", 19.8, 20.8, 1),
|
|
||||||
//new Property("Amazing property in the best district of Marseille", "15 rue de Marseille", 15.8, 17.8, 1),
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,10 +2,10 @@ package fr.romanet.vj.apps.myrealestateagency.entities;
|
|||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.room.ColumnInfo;
|
import androidx.room.ColumnInfo;
|
||||||
import androidx.room.Embedded;
|
import androidx.room.TypeConverters;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.sql.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public class PropertyStatue implements Serializable {
|
public class PropertyStatue implements Serializable {
|
||||||
|
|
||||||
@ -14,6 +14,7 @@ public class PropertyStatue implements Serializable {
|
|||||||
|
|
||||||
@ColumnInfo(name = "sold_date")
|
@ColumnInfo(name = "sold_date")
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@TypeConverters({Converters.class})
|
||||||
public Date soldDate;
|
public Date soldDate;
|
||||||
|
|
||||||
@ColumnInfo(name = "price")
|
@ColumnInfo(name = "price")
|
||||||
|
|||||||
@ -20,7 +20,6 @@ import fr.romanet.vj.apps.myrealestateagency.R;
|
|||||||
import fr.romanet.vj.apps.myrealestateagency.entities.Property;
|
import fr.romanet.vj.apps.myrealestateagency.entities.Property;
|
||||||
import fr.romanet.vj.apps.myrealestateagency.repository.PropertyRepository;
|
import fr.romanet.vj.apps.myrealestateagency.repository.PropertyRepository;
|
||||||
import fr.romanet.vj.apps.myrealestateagency.viewmodel.EditPropertyActivityViewModel;
|
import fr.romanet.vj.apps.myrealestateagency.viewmodel.EditPropertyActivityViewModel;
|
||||||
import fr.romanet.vj.apps.myrealestateagency.viewmodel.PropertiesDetailActivityViewModel;
|
|
||||||
|
|
||||||
public class EditPropertyActivity extends AppCompatActivity {
|
public class EditPropertyActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import androidx.lifecycle.ViewModelProvider;
|
|||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import fr.romanet.vj.apps.myrealestateagency.R;
|
import fr.romanet.vj.apps.myrealestateagency.R;
|
||||||
|
|||||||
@ -9,6 +9,17 @@
|
|||||||
tools:context=".view.EditPropertyActivity"
|
tools:context=".view.EditPropertyActivity"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView3"
|
||||||
|
android:layout_width="82dp"
|
||||||
|
android:layout_height="31dp"
|
||||||
|
android:layout_marginTop="60dp"
|
||||||
|
android:text="@string/price"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/editPropertyPrice"
|
||||||
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/textView2"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView2" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/avatar"
|
android:id="@+id/avatar"
|
||||||
android:layout_width="105dp"
|
android:layout_width="105dp"
|
||||||
@ -28,6 +39,7 @@
|
|||||||
android:inputType="textPersonName"
|
android:inputType="textPersonName"
|
||||||
app:layout_constraintBottom_toTopOf="@id/editPropertyPrice"
|
app:layout_constraintBottom_toTopOf="@id/editPropertyPrice"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/avatar" />
|
app:layout_constraintTop_toBottomOf="@id/avatar" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
@ -38,6 +50,7 @@
|
|||||||
android:inputType="textPersonName"
|
android:inputType="textPersonName"
|
||||||
app:layout_constraintBottom_toTopOf="@id/editPropertyPrice"
|
app:layout_constraintBottom_toTopOf="@id/editPropertyPrice"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
app:layout_constraintStart_toStartOf="@+id/editPropertyType"
|
app:layout_constraintStart_toStartOf="@+id/editPropertyType"
|
||||||
app:layout_constraintTop_toBottomOf="@id/editPropertyType" />
|
app:layout_constraintTop_toBottomOf="@id/editPropertyType" />
|
||||||
|
|
||||||
@ -48,10 +61,10 @@
|
|||||||
android:hint="@string/price"
|
android:hint="@string/price"
|
||||||
android:inputType="textPersonName"
|
android:inputType="textPersonName"
|
||||||
app:layout_constraintBottom_toTopOf="@id/editPropertySurface"
|
app:layout_constraintBottom_toTopOf="@id/editPropertySurface"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintEnd_toEndOf="@+id/editPropertyNumberOfRooms"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
app:layout_constraintTop_toBottomOf="@id/editPropertyNumberOfRooms"
|
app:layout_constraintStart_toStartOf="@+id/editPropertyNumberOfRooms"
|
||||||
/>
|
app:layout_constraintTop_toBottomOf="@id/editPropertyNumberOfRooms" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/editPropertySurface"
|
android:id="@+id/editPropertySurface"
|
||||||
@ -60,10 +73,9 @@
|
|||||||
android:hint="@string/surface"
|
android:hint="@string/surface"
|
||||||
android:inputType="phone"
|
android:inputType="phone"
|
||||||
app:layout_constraintBottom_toTopOf="@id/editPropertyStatueSale"
|
app:layout_constraintBottom_toTopOf="@id/editPropertyStatueSale"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintEnd_toEndOf="@+id/editPropertyPrice"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintStart_toStartOf="@+id/editPropertyPrice"
|
||||||
app:layout_constraintTop_toBottomOf="@id/editPropertyPrice"
|
app:layout_constraintTop_toBottomOf="@id/editPropertyPrice" />
|
||||||
/>
|
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/editPropertyStatueSale"
|
android:id="@+id/editPropertyStatueSale"
|
||||||
@ -72,10 +84,9 @@
|
|||||||
android:hint="@string/statueSale"
|
android:hint="@string/statueSale"
|
||||||
android:inputType="textPersonName"
|
android:inputType="textPersonName"
|
||||||
app:layout_constraintBottom_toTopOf="@id/editPropertySoldDate"
|
app:layout_constraintBottom_toTopOf="@id/editPropertySoldDate"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintEnd_toEndOf="@+id/editPropertySurface"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintStart_toStartOf="@+id/editPropertySurface"
|
||||||
app:layout_constraintTop_toBottomOf="@id/editPropertySurface"
|
app:layout_constraintTop_toBottomOf="@id/editPropertySurface" />
|
||||||
/>
|
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/editPropertySoldDate"
|
android:id="@+id/editPropertySoldDate"
|
||||||
@ -84,10 +95,9 @@
|
|||||||
android:hint="@string/soldDate"
|
android:hint="@string/soldDate"
|
||||||
android:inputType="textPersonName"
|
android:inputType="textPersonName"
|
||||||
app:layout_constraintBottom_toTopOf="@id/editPropertyDescription"
|
app:layout_constraintBottom_toTopOf="@id/editPropertyDescription"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintEnd_toEndOf="@+id/editPropertyStatueSale"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintStart_toStartOf="@+id/editPropertyStatueSale"
|
||||||
app:layout_constraintTop_toBottomOf="@id/editPropertyStatueSale"
|
app:layout_constraintTop_toBottomOf="@id/editPropertyStatueSale" />
|
||||||
/>
|
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/editPropertyDescription"
|
android:id="@+id/editPropertyDescription"
|
||||||
@ -95,13 +105,12 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/description"
|
android:hint="@string/description"
|
||||||
android:inputType="textMultiLine"
|
android:inputType="textMultiLine"
|
||||||
android:minLines="4"
|
|
||||||
android:lines="4"
|
android:lines="4"
|
||||||
|
android:minLines="4"
|
||||||
app:layout_constraintBottom_toTopOf="@id/editPropertyButton"
|
app:layout_constraintBottom_toTopOf="@id/editPropertyButton"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/editPropertySoldDate"
|
app:layout_constraintStart_toStartOf="@+id/editPropertySoldDate"
|
||||||
/>
|
app:layout_constraintTop_toBottomOf="@id/editPropertySoldDate" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/editPropertyButton"
|
android:id="@+id/editPropertyButton"
|
||||||
@ -123,21 +132,66 @@
|
|||||||
android:text="@string/Type"
|
android:text="@string/Type"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/editPropertyNumberOfRooms"
|
app:layout_constraintBottom_toTopOf="@+id/editPropertyNumberOfRooms"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/editPropertyType"
|
app:layout_constraintEnd_toStartOf="@+id/editPropertyType"
|
||||||
app:layout_constraintHorizontal_bias="0.035"
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/avatar"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintVertical_bias="0.804" />
|
app:layout_constraintVertical_bias="0.944" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView2"
|
android:id="@+id/textView2"
|
||||||
android:layout_width="93dp"
|
android:layout_width="104dp"
|
||||||
android:layout_height="52dp"
|
android:layout_height="47dp"
|
||||||
android:layout_marginEnd="40dp"
|
android:layout_marginEnd="40dp"
|
||||||
android:text="@string/Number_of_room"
|
android:text="@string/Number_of_room"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/editPropertyPrice"
|
app:layout_constraintBottom_toTopOf="@+id/editPropertyPrice"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/editPropertyNumberOfRooms"
|
app:layout_constraintEnd_toStartOf="@+id/editPropertyNumberOfRooms"
|
||||||
app:layout_constraintHorizontal_bias="0.0"
|
app:layout_constraintHorizontal_bias="0.347"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="@+id/textView"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textView"
|
app:layout_constraintTop_toBottomOf="@+id/textView"
|
||||||
app:layout_constraintVertical_bias="0.47" />
|
app:layout_constraintVertical_bias="1.0" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView4"
|
||||||
|
android:layout_width="83dp"
|
||||||
|
android:layout_height="34dp"
|
||||||
|
android:layout_marginTop="56dp"
|
||||||
|
android:text="@string/surface"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/editPropertySurface"
|
||||||
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/textView3"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView3" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView5"
|
||||||
|
android:layout_width="84dp"
|
||||||
|
android:layout_height="33dp"
|
||||||
|
android:layout_marginTop="40dp"
|
||||||
|
android:text="@string/statueSale"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/editPropertyStatueSale"
|
||||||
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/textView4"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView4" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView6"
|
||||||
|
android:layout_width="78dp"
|
||||||
|
android:layout_height="39dp"
|
||||||
|
android:layout_marginTop="36dp"
|
||||||
|
android:text="@string/soldDate"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/editPropertySoldDate"
|
||||||
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/textView5"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView5" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView7"
|
||||||
|
android:layout_width="86dp"
|
||||||
|
android:layout_height="45dp"
|
||||||
|
android:layout_marginTop="72dp"
|
||||||
|
android:text="@string/description"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/editPropertyDescription"
|
||||||
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/textView6"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView6" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@ -20,13 +20,13 @@
|
|||||||
android:id="@+id/recyclerViewProperties"
|
android:id="@+id/recyclerViewProperties"
|
||||||
android:layout_width="411dp"
|
android:layout_width="411dp"
|
||||||
android:layout_height="508dp"
|
android:layout_height="508dp"
|
||||||
|
android:layout_marginBottom="36dp"
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.0"
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/toolbarDisconnect"
|
app:layout_constraintTop_toBottomOf="@+id/toolbarDisconnect" />
|
||||||
app:layout_constraintVertical_bias="1.0" />
|
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
android:id="@+id/buttonAddProperty"
|
android:id="@+id/buttonAddProperty"
|
||||||
@ -39,4 +39,16 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView8"
|
||||||
|
android:layout_width="177dp"
|
||||||
|
android:layout_height="47dp"
|
||||||
|
android:text="List of properties :"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/recyclerViewProperties"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.572"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/toolbarDisconnect"
|
||||||
|
app:layout_constraintVertical_bias="0.411" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
Loading…
Reference in New Issue
Block a user