mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Add onClick() for button
This commit is contained in:
parent
e00cdff217
commit
bfb41850b0
2 changed files with 15 additions and 8 deletions
|
|
@ -318,13 +318,6 @@ public class CategorizationFragment extends Fragment {
|
||||||
categoriesNotFoundView = (TextView) rootView.findViewById(R.id.categoriesNotFound);
|
categoriesNotFoundView = (TextView) rootView.findViewById(R.id.categoriesNotFound);
|
||||||
categoriesSkip = (TextView) rootView.findViewById(R.id.categoriesExplanation);
|
categoriesSkip = (TextView) rootView.findViewById(R.id.categoriesExplanation);
|
||||||
|
|
||||||
//FIXME: Put this back into SingleUploadFragment.java
|
|
||||||
//Retrieve last title and desc entered when user clicked Submit icon
|
|
||||||
SharedPreferences titleDesc = PreferenceManager.getDefaultSharedPreferences(getActivity());
|
|
||||||
String title = titleDesc.getString("Title", "");
|
|
||||||
String desc = titleDesc.getString("Desc", "");
|
|
||||||
Log.d(TAG, "Title: " + title + ", Desc: " + desc);
|
|
||||||
|
|
||||||
categoriesSkip.setOnClickListener(new View.OnClickListener() {
|
categoriesSkip.setOnClickListener(new View.OnClickListener() {
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
getActivity().onBackPressed();
|
getActivity().onBackPressed();
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import android.preference.PreferenceManager;
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
|
|
@ -38,6 +39,8 @@ public class SingleUploadFragment extends Fragment {
|
||||||
|
|
||||||
private OnUploadActionInitiated uploadActionInitiatedHandler;
|
private OnUploadActionInitiated uploadActionInitiatedHandler;
|
||||||
|
|
||||||
|
private static final String TAG = "SingleUploadFragment";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||||
inflater.inflate(R.menu.activity_share, menu);
|
inflater.inflate(R.menu.activity_share, menu);
|
||||||
|
|
@ -76,7 +79,18 @@ public class SingleUploadFragment extends Fragment {
|
||||||
descEdit = (EditText)rootView.findViewById(R.id.descEdit);
|
descEdit = (EditText)rootView.findViewById(R.id.descEdit);
|
||||||
Button titleDescButton = (Button) rootView.findViewById(R.id.titleDescButton);
|
Button titleDescButton = (Button) rootView.findViewById(R.id.titleDescButton);
|
||||||
|
|
||||||
//TODO: Add button here for 'copy from previous upload'
|
titleDescButton.setOnClickListener(new View.OnClickListener()
|
||||||
|
{
|
||||||
|
public void onClick(View v)
|
||||||
|
{
|
||||||
|
//Retrieve last title and desc entered
|
||||||
|
SharedPreferences titleDesc = PreferenceManager.getDefaultSharedPreferences(getActivity());
|
||||||
|
String title = titleDesc.getString("Title", "");
|
||||||
|
String desc = titleDesc.getString("Desc", "");
|
||||||
|
Log.d(TAG, "Title: " + title + ", Desc: " + desc);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
licenseSummaryView = (TextView)rootView.findViewById(R.id.share_license_summary);
|
licenseSummaryView = (TextView)rootView.findViewById(R.id.share_license_summary);
|
||||||
|
|
||||||
TextWatcher uploadEnabler = new TextWatcher() {
|
TextWatcher uploadEnabler = new TextWatcher() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue