1
0
mirror of https://github.com/akaessens/NoFbEventScraper synced 2025-06-05 23:29:13 +02:00

Inital release.

add about page
This commit is contained in:
akaessens
2020-03-29 12:04:37 +02:00
parent 42a91802dc
commit 7e015c87d5
7 changed files with 124 additions and 22 deletions

View File

@ -9,7 +9,7 @@ android {
minSdkVersion 26 minSdkVersion 26
targetSdkVersion 29 targetSdkVersion 29
versionCode 1 versionCode 1
versionName "0.1" versionName "0.1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }

View File

@ -11,41 +11,42 @@
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
<activity android:name=".AboutActivity"></activity>
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar"> android:theme="@style/AppTheme.NoActionBar">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" /> <category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with "https://*.facebook.com/events” --> <!-- Accepts URIs that begin with "https://*.facebook.com/events” -->
<data android:scheme="https" <data
android:host="*.facebook.com" android:host="*.facebook.com"
android:pathPrefix="/events" /> android:pathPrefix="/events"
android:scheme="https" />
<!-- Accepts URIs that begin with "https://facebook.com/events” --> <!-- Accepts URIs that begin with "https://facebook.com/events” -->
<data android:scheme="https" <data
android:host="facebook.com" android:host="facebook.com"
android:pathPrefix="/events" /> android:pathPrefix="/events"
android:scheme="https" />
</intent-filter> </intent-filter>
<!-- Accepts share intents” --> <!-- Accepts share intents” -->
<intent-filter> <intent-filter>
<action android:name="android.intent.action.SEND" /> <action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain"/>
<data android:mimeType="text/plain" />
</intent-filter> </intent-filter>
</activity> </activity>
</application> </application>
</manifest> </manifest>

View File

@ -0,0 +1,14 @@
package com.akdev.nofbeventscraper;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class AboutActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about);
}
}

View File

@ -12,6 +12,8 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar; import androidx.appcompat.widget.Toolbar;
import android.provider.CalendarContract; import android.provider.CalendarContract;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;
import android.widget.Toast; import android.widget.Toast;
@ -239,10 +241,9 @@ public class MainActivity extends AppCompatActivity {
field_event_location.setText(event.location); field_event_location.setText(event.location);
field_event_description.setText(event.description); field_event_description.setText(event.description);
} }
}
/*@Override @Override
public boolean onCreateOptionsMenu(Menu menu) { public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present. // Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu); getMenuInflater().inflate(R.menu.menu_main, menu);
@ -257,10 +258,12 @@ public class MainActivity extends AppCompatActivity {
int id = item.getItemId(); int id = item.getItemId();
//noinspection SimplifiableIfStatement //noinspection SimplifiableIfStatement
if (id == R.id.action_settings) { if (id == R.id.action_about) {
startActivity(new Intent(this, AboutActivity.class));
return true; return true;
} }
return super.onOptionsItemSelected(item); return super.onOptionsItemSelected(item);
}*/ }
}

View File

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".AboutActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/about_heading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:text="@string/action_about"
android:textAppearance="@style/TextAppearance.AppCompat.Large" />
<TextView
android:id="@+id/about_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:text="@string/about_text"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
<TextView
android:id="@+id/open_source_heading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="16dp"
android:text="@string/open_source_heading"
android:textAppearance="@style/TextAppearance.AppCompat.Large" />
<TextView
android:id="@+id/open_source_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:autoLink="web"
android:text="@string/open_source_text"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
<TextView
android:id="@+id/changelog_heading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="16dp"
android:text="@string/changelog_heading"
android:textAppearance="@style/TextAppearance.AppCompat.Large" />
<TextView
android:id="@+id/changelog_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:autoLink="web"
android:text="@string/changelog_text"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -3,8 +3,8 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
tools:context="com.akdev.nofbeventscraper.MainActivity"> tools:context="com.akdev.nofbeventscraper.MainActivity">
<item <item
android:id="@+id/action_settings" android:id="@+id/action_about"
android:icon="@android:drawable/ic_menu_info_details"
android:orderInCategory="100" android:orderInCategory="100"
android:title="@string/action_settings" android:title="@string/action_about" />
app:showAsAction="never" />
</menu> </menu>

View File

@ -1,6 +1,15 @@
<resources> <resources>
<string name="app_name">NoFb Event Scraper</string> <string name="app_name">NoFb Event Scraper</string>
<string name="action_settings">Settings</string> <string name="action_about">About</string>
<string name="hello_message">This app scrapes facebook event links and adds the event to your calendar.</string>
<string name="add_link_hint">Paste facebook link to the event.</string> <string name="add_link_hint">Paste facebook link to the event.</string>
<string name="about_text">This application was developed to be used without a facebook account.
\nTherefore it does not use the facebook API.
Instead it opens the facebook event URI and downloads the website source code.
This source contains the event information which is used to create a calendar entry.
</string>
<string name="open_source_heading"> Open Source </string>
<string name="open_source_text"> The source code for this application can be found at https://github.com/akaessens/NoFbEventScraper .</string>
<string name="changelog_heading"> Changelog </string>
<string name="changelog_text"> v0.1.0\t\tInitial release.</string>
</resources> </resources>