Compare commits
1 Commits
master
...
gradle-plu
Author | SHA1 | Date | |
---|---|---|---|
01c221181e |
@ -1,9 +1,4 @@
|
||||
# Changelog
|
||||
## v0.5.0 (15)
|
||||
- parallelize multiple event scraping
|
||||
- add scraping history
|
||||
- allow entering page name without URL format
|
||||
- updated dependencies
|
||||
## v0.4.4 (14)
|
||||
- Fix Android 11 intents (to open Calendar or Maps)
|
||||
## v0.4.3 (13)
|
||||
|
@ -33,8 +33,7 @@ This Android app is written in Java and is using the Gradle build system. To com
|
||||
|
||||
# Screenshots
|
||||
|
||||
<img src="https://github.com/akaessens/NoFbEventScraper/raw/master/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png" alt="Screenshot 1" width="150"> <img src="https://github.com/akaessens/NoFbEventScraper/raw/master/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png" alt="Screenshot 2" width="150"> <img src="https://github.com/akaessens/NoFbEventScraper/raw/master/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png" alt="Screenshot 3" width="150"> <img src="https://github.com/akaessens/NoFbEventScraper/raw/master/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png" alt="Screenshot 4" width="150"> <img
|
||||
src="https://github.com/akaessens/NoFbEventScraper/raw/master/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png" alt="Screenshot 5" width="150">
|
||||
<img src="https://github.com/akaessens/NoFbEventScraper/raw/master/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png" alt="Screenshot 1" width="200"> <img src="https://github.com/akaessens/NoFbEventScraper/raw/master/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png" alt="Screenshot 2" width="200"> <img src="https://github.com/akaessens/NoFbEventScraper/raw/master/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png" alt="Screenshot 3" width="200"> <img src="https://github.com/akaessens/NoFbEventScraper/raw/master/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png" alt="Screenshot 4" width="200">
|
||||
|
||||
# Donations
|
||||
I develop this application in my free time. If you like it, you can donate at <a href="https://www.paypal.me/andreaskaessens">PayPal</a>.
|
||||
|
@ -7,8 +7,8 @@ android {
|
||||
applicationId "com.akdev.nofbeventscraper"
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 30
|
||||
versionCode 15
|
||||
versionName "0.5.0"
|
||||
versionCode 14
|
||||
versionName "0.4.4"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
@ -12,8 +12,6 @@ import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.AutoCompleteTextView;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.view.menu.MenuBuilder;
|
||||
@ -25,13 +23,13 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.google.android.material.appbar.AppBarLayout;
|
||||
import com.google.android.material.appbar.CollapsingToolbarLayout;
|
||||
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton;
|
||||
import com.google.android.material.textfield.TextInputEditText;
|
||||
import com.google.android.material.textfield.TextInputLayout;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@ -42,7 +40,7 @@ import static com.akdev.nofbeventscraper.FbEvent.createEventList;
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
protected ExtendedFloatingActionButton paste_button;
|
||||
protected AutoCompleteTextView edit_text_uri_input;
|
||||
protected TextInputEditText edit_text_uri_input;
|
||||
protected TextInputLayout layout_uri_input;
|
||||
|
||||
|
||||
@ -51,28 +49,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
EventAdapter adapter;
|
||||
LinearLayoutManager linear_layout_manager;
|
||||
|
||||
List<String> history;
|
||||
ArrayAdapter<String> history_adapter;
|
||||
|
||||
|
||||
private List<String> getHistory() {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
Gson gson = new Gson();
|
||||
String json = prefs.getString("history", "");
|
||||
|
||||
Type history_type = new TypeToken<List<String>>() {
|
||||
}.getType();
|
||||
List<String> list = gson.fromJson(json, history_type);
|
||||
|
||||
if (list == null) {
|
||||
list = new ArrayList<>();
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
private List<FbEvent> getSavedEvents() {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
@ -105,12 +81,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
if (getHistory().isEmpty()) {
|
||||
history.clear();
|
||||
history_adapter.clear();
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
/*
|
||||
* Intent from IntentReceiver - read only once
|
||||
*/
|
||||
@ -136,9 +106,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
Gson gson = new Gson();
|
||||
String json = gson.toJson(events);
|
||||
prefs_edit.putString("events", json);
|
||||
|
||||
json = gson.toJson(history);
|
||||
prefs_edit.putString("history", json);
|
||||
prefs_edit.apply();
|
||||
}
|
||||
|
||||
@ -165,10 +132,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
linear_layout_manager = new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false);
|
||||
recycler_view.setLayoutManager(linear_layout_manager);
|
||||
|
||||
// restore history
|
||||
this.history = getHistory();
|
||||
history_adapter = new ArrayAdapter<>(this, android.R.layout.simple_expandable_list_item_1, history);
|
||||
|
||||
recycler_view.setItemAnimator(new FadeInAnimator());
|
||||
|
||||
|
||||
@ -234,14 +197,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
};
|
||||
layout_uri_input.setErrorIconOnClickListener(listener);
|
||||
layout_uri_input.setEndIconOnClickListener(listener);
|
||||
edit_text_uri_input.setAdapter(history_adapter);
|
||||
|
||||
layout_uri_input.setStartIconOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
edit_text_uri_input.showDropDown();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
@ -280,9 +235,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
scraper = new FbScraper(new WeakReference<>(this), url);
|
||||
|
||||
scraper.run();
|
||||
|
||||
history_adapter.insert(url, 0);
|
||||
history.add(0, url);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -43,20 +43,16 @@ public class SettingsActivity extends AppCompatActivity {
|
||||
|
||||
final SharedPreferences prefs = preference.getSharedPreferences();
|
||||
|
||||
final String events = prefs.getString("events", "");
|
||||
final String undo = prefs.getString("events", "");
|
||||
prefs.edit().remove("events").apply();
|
||||
|
||||
final String history = prefs.getString("history", "");
|
||||
prefs.edit().remove("history").apply();
|
||||
|
||||
Snackbar.make(getActivity().findViewById(android.R.id.content),
|
||||
getString(R.string.preferences_event_snackbar), Snackbar.LENGTH_SHORT)
|
||||
.setAction(R.string.undo, new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
prefs.edit().putString("events", events).apply();
|
||||
prefs.edit().putString("history", history).apply();
|
||||
prefs.edit().putString("events", undo).apply();
|
||||
}
|
||||
}).show();
|
||||
|
||||
|
@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M13,3c-4.97,0 -9,4.03 -9,9L1,12l3.89,3.89 0.07,0.14L9,12L6,12c0,-3.87 3.13,-7 7,-7s7,3.13 7,7 -3.13,7 -7,7c-1.93,0 -3.68,-0.79 -4.94,-2.06l-1.42,1.42C8.27,19.99 10.51,21 13,21c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zM12,8v5l4.25,2.52 0.77,-1.28 -3.52,-2.09L13.5,8z"
|
||||
android:fillColor="#000000"/>
|
||||
</vector>
|
@ -17,7 +17,7 @@
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/layout_uri_input"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox.ExposedDropdownMenu"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
@ -26,10 +26,9 @@
|
||||
app:endIconMode="clear_text"
|
||||
app:errorIconDrawable="@drawable/ic_backspace_black"
|
||||
app:helperText="@string/helper_add_link"
|
||||
app:helperTextEnabled="true"
|
||||
app:startIconDrawable="@drawable/ic_history_black">
|
||||
app:helperTextEnabled="true">
|
||||
|
||||
<com.google.android.material.textfield.MaterialAutoCompleteTextView
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/edit_text_uri_input"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -7,7 +7,7 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.1.3'
|
||||
classpath 'com.android.tools.build:gradle:7.0.0'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
@ -1,4 +0,0 @@
|
||||
- parallelize multiple event scraping
|
||||
- add scraping history
|
||||
- allow entering page name without URL format
|
||||
- updated dependencies
|
Before Width: | Height: | Size: 304 KiB After Width: | Height: | Size: 200 KiB |
Before Width: | Height: | Size: 290 KiB After Width: | Height: | Size: 245 KiB |
Before Width: | Height: | Size: 321 KiB After Width: | Height: | Size: 261 KiB |
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 185 KiB |