-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from nning/gallery_manager
Add gallery manager
- Loading branch information
Showing
24 changed files
with
624 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,53 @@ | ||
<manifest | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="net.orgizm.imgshr"> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="net.orgizm.imgshr"> | ||
|
||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
|
||
<application | ||
<application | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:supportsRtl="true" | ||
android:theme="@android:style/Theme.Holo.Light.Dialog"> | ||
|
||
<activity android:name="ShareActivity" android:label="@string/app_name"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.SEND" /> | ||
<action android:name="android.intent.action.SEND_MULTIPLE" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
<data android:mimeType="image/*" /> | ||
</intent-filter> | ||
|
||
<intent-filter> | ||
<action android:name="android.intent.action.VIEW" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
<category android:name="android.intent.category.BROWSABLE" /> | ||
<data android:scheme="https" android:host="imgshr.space" android:pathPattern="/!.*" /> | ||
</intent-filter> | ||
android:theme="@style/AppTheme"> | ||
<activity | ||
android:name=".GalleryListActivity" | ||
android:label="@string/app_name"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity | ||
android:name=".ShareActivity" | ||
android:label="@string/app_name" | ||
android:theme="@android:style/Theme.Holo.Light.Dialog"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.SEND" /> | ||
<action android:name="android.intent.action.SEND_MULTIPLE" /> | ||
|
||
<category android:name="android.intent.category.DEFAULT" /> | ||
|
||
<data android:mimeType="image/*" /> | ||
</intent-filter> | ||
<intent-filter> | ||
<action android:name="android.intent.action.VIEW" /> | ||
|
||
<category android:name="android.intent.category.DEFAULT" /> | ||
<category android:name="android.intent.category.BROWSABLE" /> | ||
|
||
<data | ||
android:host="imgshr.space" | ||
android:pathPattern="/!.*" | ||
android:scheme="https" /> | ||
</intent-filter> | ||
</activity> | ||
<activity | ||
android:name=".GalleryAddActivity" | ||
android:label="@string/add_gallery" | ||
android:theme="@android:style/Theme.Holo.Light.Dialog"> | ||
</activity> | ||
</application> | ||
</manifest> | ||
|
||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package net.orgizm.imgshr; | ||
|
||
public class Gallery { | ||
private String slug; | ||
|
||
public Gallery() { | ||
} | ||
|
||
public Gallery(String slug) { | ||
this.slug = slug; | ||
} | ||
|
||
public String getSlug() { | ||
return slug; | ||
} | ||
|
||
public void setSlug(String slug) { | ||
this.slug = slug; | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
app/src/main/java/net/orgizm/imgshr/GalleryAddActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package net.orgizm.imgshr; | ||
|
||
import android.app.Activity; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.TextView; | ||
import android.widget.Toast; | ||
|
||
public class GalleryAddActivity extends Activity | ||
{ | ||
private TextView slug; | ||
private Preferences preferences; | ||
|
||
@Override | ||
public void onCreate(Bundle savedInstanceState) | ||
{ | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.gallery_add_activity); | ||
|
||
slug = (TextView) findViewById(R.id.slug); | ||
preferences = new Preferences(getApplicationContext()); | ||
} | ||
|
||
public void addGalleryCallback(View view) { | ||
preferences.setLastSlugs(new Gallery(slug.getText().toString())); | ||
Toast.makeText(getApplicationContext(), R.string.gallery_saved, Toast.LENGTH_SHORT).show(); | ||
finish(); | ||
} | ||
} |
Oops, something went wrong.