-
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.
- Loading branch information
Showing
8 changed files
with
85 additions
and
11 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
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(); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:paddingTop="8dp" | ||
android:paddingBottom="8dp" | ||
android:paddingLeft="8dp" | ||
android:paddingRight="8dp" | ||
> | ||
|
||
<EditText | ||
android:id="@+id/slug" | ||
android:layout_width="0dp" | ||
android:layout_height="50dp" | ||
android:hint="@string/slug_hint" | ||
android:inputType="text" | ||
android:layout_alignParentStart="true" | ||
android:layout_alignParentLeft="true" | ||
android:layout_toStartOf="@+id/button" | ||
android:layout_toLeftOf="@+id/button" | ||
android:paddingTop="2dp" | ||
android:paddingBottom="2dp" | ||
android:paddingLeft="8dp" | ||
android:paddingRight="8dp" | ||
/> | ||
|
||
<Button | ||
android:id="@+id/button" | ||
android:layout_width="wrap_content" | ||
android:layout_height="50dp" | ||
android:layout_alignParentRight="true" | ||
android:layout_alignParentEnd="true" | ||
android:text="@string/save_button" | ||
android:onClick="addGalleryCallback" | ||
android:paddingTop="2dp" | ||
android:paddingBottom="2dp" | ||
android:paddingLeft="12dp" | ||
android:paddingRight="12dp" | ||
/> | ||
</RelativeLayout> |
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