Font now changes according to last change when starting application, added scrollView to location detail, location detail now takes location name and description and added 2 discriptions to location.json
This commit is contained in:
@@ -123,13 +123,13 @@
|
|||||||
{
|
{
|
||||||
"name":"Belcrum Beach Veilingkade 12a",
|
"name":"Belcrum Beach Veilingkade 12a",
|
||||||
"coordinates":"51.599434239284726,4.76632797992092",
|
"coordinates":"51.599434239284726,4.76632797992092",
|
||||||
"description":"4815HC Breda",
|
"description":"Belcrum Beach is HET stadsstrand van Breda, gelegen op het Haveneiland in de wijk Belcrum. Wij zijn begonnen in 2013 op deze unieke lokatie in Breda. Het strand werkt met drie beheerders en een groot aantal vrijwilligers voor bar, onderhoud, programmering, sponsoring en tuin. Een plek om te relaxen met een drankje en een hapje, genietend van de zon, gezellig kletsen met je vrienden, luisterend naar muziek van een band of DJ, soms in een festival setting. Kinderen die kunnen spelen in het zand of mee kunnen doen aan speciale kinderactiviteiten. Belcrum Beach is ook een unieke lokatie voor een feestje of om je verjaardag te vieren, trouwen op het strand of een trouwfeest behoren ook tot de mogelijkheden.",
|
||||||
"imageUrl":"belcrum_beach"
|
"imageUrl":"belcrum_beach"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name":"De Belcrum Watertoren (1935) Speelhuislaan 158",
|
"name":"De Belcrum Watertoren (1935) Speelhuislaan 158",
|
||||||
"coordinates":"51.60135351009892,4.7705765989322755",
|
"coordinates":"51.60135351009892,4.7705765989322755",
|
||||||
"description":"4815CJ Breda",
|
"description":"De watertoren in de Belcrum in Breda is een industrieel monument uit het interbellum. De toren is de thuisbasis voor SOAB adviseurs voor woning en leefomgeving en onderstreept de missie van ons bureau. De toren hoort bij de Belcrum. Als landmark en als onderdak voor activiteiten. Zo vierden de Belcrummers hun 400 jaar bestaan in de toren en worden lunches met rondleiding op hoog niveau georganiseerd. Kijken en proeven.",
|
||||||
"imageUrl":"belcrum_watertoren"
|
"imageUrl":"belcrum_watertoren"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -11,6 +11,7 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.a1.nextlocation.R;
|
import com.a1.nextlocation.R;
|
||||||
import com.a1.nextlocation.data.Location;
|
import com.a1.nextlocation.data.Location;
|
||||||
@@ -20,6 +21,8 @@ public class LocationDetailFragment extends Fragment {
|
|||||||
private ImageButton imageButton;
|
private ImageButton imageButton;
|
||||||
private ImageView locationImage;
|
private ImageView locationImage;
|
||||||
private Location location;
|
private Location location;
|
||||||
|
private TextView titelText;
|
||||||
|
private TextView detailText;
|
||||||
|
|
||||||
public LocationDetailFragment(){}
|
public LocationDetailFragment(){}
|
||||||
|
|
||||||
@@ -30,8 +33,14 @@ public class LocationDetailFragment extends Fragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
|
||||||
View view = inflater.inflate(R.layout.fragment_location_detail, container, false);
|
View view = inflater.inflate(R.layout.fragment_location_detail, container, false);
|
||||||
|
|
||||||
|
this.titelText = view.findViewById(R.id.detail_location_name);
|
||||||
|
this.titelText.setText(location.getName());
|
||||||
|
|
||||||
|
this.detailText = view.findViewById(R.id.detail_location_text);
|
||||||
|
this.detailText.setText(location.getDescription());
|
||||||
|
|
||||||
this.imageButton = view.findViewById(R.id.detail_location_back_button);
|
this.imageButton = view.findViewById(R.id.detail_location_back_button);
|
||||||
this.imageButton.setOnClickListener(v -> {
|
this.imageButton.setOnClickListener(v -> {
|
||||||
LocationFragment locationFragment = new LocationFragment();
|
LocationFragment locationFragment = new LocationFragment();
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import com.a1.nextlocation.R;
|
|||||||
public class SettingsFragment extends Fragment {
|
public class SettingsFragment extends Fragment {
|
||||||
|
|
||||||
private ImageView imageButton;
|
private ImageView imageButton;
|
||||||
|
|
||||||
SwitchCompat fontChanger;
|
SwitchCompat fontChanger;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -53,8 +54,14 @@ public class SettingsFragment extends Fragment {
|
|||||||
fontChanger = view.findViewById(R.id.BigFont);
|
fontChanger = view.findViewById(R.id.BigFont);
|
||||||
|
|
||||||
SharedPreferences sharedPreferences = requireActivity().getSharedPreferences("com.a1.nextlocation",0);
|
SharedPreferences sharedPreferences = requireActivity().getSharedPreferences("com.a1.nextlocation",0);
|
||||||
final SharedPreferences.Editor editor = sharedPreferences.edit();
|
SharedPreferences.Editor editor = sharedPreferences.edit();
|
||||||
fontChanger.setChecked(sharedPreferences.getBoolean("switch",false));
|
fontChanger.setChecked(sharedPreferences.getBoolean("switch", false));
|
||||||
|
|
||||||
|
if (fontChanger.isChecked()){
|
||||||
|
requireActivity().setTheme(R.style.Theme_NextLocationBig);
|
||||||
|
}else if (!fontChanger.isChecked()){
|
||||||
|
requireActivity().setTheme(R.style.Theme_NextLocation);
|
||||||
|
}
|
||||||
|
|
||||||
fontChanger.setOnClickListener(view1 -> {
|
fontChanger.setOnClickListener(view1 -> {
|
||||||
if(fontChanger.isChecked())
|
if(fontChanger.isChecked())
|
||||||
|
|||||||
@@ -9,12 +9,13 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/detail_location_name"
|
android:id="@+id/detail_location_name"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="300dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:text="@string/locatie_detail"
|
android:text="@string/locatie_detail"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="30sp"
|
android:textSize="30sp"
|
||||||
|
android:gravity="center"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
@@ -29,16 +30,24 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@+id/detail_location_name"
|
app:layout_constraintTop_toBottomOf="@+id/detail_location_name"
|
||||||
tools:src="@tools:sample/avatars" />
|
tools:src="@tools:sample/avatars" />
|
||||||
|
|
||||||
<TextView
|
<ScrollView
|
||||||
android:id="@+id/detail_location_text"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="200dp"
|
||||||
android:layout_margin="20dp"
|
android:layout_margin="20dp"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@color/secondaryColour"
|
|
||||||
android:text="@string/locatie_detail_tekst"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/detail_location_image" />
|
app:layout_constraintTop_toBottomOf="@+id/detail_location_image">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/detail_location_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/secondaryColour"
|
||||||
|
android:text="@string/locatie_detail_tekst"
|
||||||
|
/>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/detail_location_back_button"
|
android:id="@+id/detail_location_back_button"
|
||||||
|
|||||||
Reference in New Issue
Block a user