mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 14:53:59 +01:00 
			
		
		
		
	Merge branch 'master' of https://github.com/commons-app/apps-android-commons into delete-request
This commit is contained in:
		
						commit
						e14cca2fec
					
				
					 17 changed files with 271 additions and 88 deletions
				
			
		|  | @ -4,6 +4,8 @@ import android.annotation.SuppressLint; | |||
| import android.content.Intent; | ||||
| import android.net.Uri; | ||||
| import android.os.Bundle; | ||||
| import android.text.SpannableString; | ||||
| import android.text.style.UnderlineSpan; | ||||
| import android.util.Log; | ||||
| import android.support.customtabs.CustomTabsIntent; | ||||
| import android.support.v4.content.ContextCompat; | ||||
|  | @ -25,6 +27,7 @@ import static android.widget.Toast.LENGTH_SHORT; | |||
| public class AboutActivity extends NavigationBaseActivity { | ||||
|     @BindView(R.id.about_version) TextView versionText; | ||||
|     @BindView(R.id.about_license) HtmlTextView aboutLicenseText; | ||||
|     @BindView(R.id.about_faq) TextView faqText; | ||||
| 
 | ||||
|     /** | ||||
|      * This method helps in the creation About screen | ||||
|  | @ -40,7 +43,9 @@ public class AboutActivity extends NavigationBaseActivity { | |||
|         ButterKnife.bind(this); | ||||
|         String aboutText = getString(R.string.about_license); | ||||
|         aboutLicenseText.setHtmlText(aboutText); | ||||
| 
 | ||||
|         SpannableString content = new SpannableString(getString(R.string.about_faq)); | ||||
|         content.setSpan(new UnderlineSpan(), 0, content.length(), 0); | ||||
|         faqText.setText(content); | ||||
|         versionText.setText(BuildConfig.VERSION_NAME); | ||||
|         initDrawer(); | ||||
|     } | ||||
|  | @ -113,4 +118,9 @@ public class AboutActivity extends NavigationBaseActivity { | |||
|         } | ||||
|     } | ||||
| 
 | ||||
|     @OnClick(R.id.about_faq) | ||||
|     public void launchFrequentlyAskedQuesions(View view) { | ||||
|         Utils.handleWebUrl(this,Uri.parse("https://github.com/commons-app/apps-android-commons/wiki/Frequently-Asked-Questions\\")); | ||||
|     } | ||||
| 
 | ||||
| } | ||||
|  |  | |||
|  | @ -5,6 +5,7 @@ import android.support.v4.view.PagerAdapter; | |||
| import android.view.LayoutInflater; | ||||
| import android.view.View; | ||||
| import android.view.ViewGroup; | ||||
| import android.widget.TextView; | ||||
| 
 | ||||
| import butterknife.ButterKnife; | ||||
| import butterknife.OnClick; | ||||
|  | @ -54,10 +55,18 @@ public class WelcomePagerAdapter extends PagerAdapter { | |||
|     public Object instantiateItem(ViewGroup container, int position) { | ||||
|         LayoutInflater inflater = LayoutInflater.from(container.getContext()); | ||||
|         ViewGroup layout = (ViewGroup) inflater.inflate(PAGE_LAYOUTS[position], container, false); | ||||
| 
 | ||||
|         if (position == PAGE_FINAL) { | ||||
|         if( BuildConfig.FLAVOR == "beta"){ | ||||
|             TextView textView = (TextView) layout.findViewById(R.id.welcomeYesButton); | ||||
|             if( textView.getVisibility() != View.VISIBLE){ | ||||
|                 textView.setVisibility(View.VISIBLE); | ||||
|             } | ||||
|             ViewHolder holder = new ViewHolder(layout); | ||||
|             layout.setTag(holder); | ||||
|         } else { | ||||
|             if (position == PAGE_FINAL) { | ||||
|                 ViewHolder holder = new ViewHolder(layout); | ||||
|                 layout.setTag(holder); | ||||
|             } | ||||
|         } | ||||
|         container.addView(layout); | ||||
|         return layout; | ||||
|  | @ -92,5 +101,6 @@ public class WelcomePagerAdapter extends PagerAdapter { | |||
|                 callback.onYesClicked(); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|     } | ||||
| } | ||||
|  |  | |||
|  | @ -8,6 +8,7 @@ import android.app.Activity; | |||
| import android.app.ProgressDialog; | ||||
| import android.content.Intent; | ||||
| import android.content.SharedPreferences; | ||||
| import android.net.Uri; | ||||
| import android.os.Bundle; | ||||
| import android.support.annotation.ColorRes; | ||||
| import android.support.annotation.NonNull; | ||||
|  | @ -27,6 +28,7 @@ import android.view.inputmethod.InputMethodManager; | |||
| import android.widget.Button; | ||||
| import android.widget.EditText; | ||||
| import android.widget.TextView; | ||||
| import android.widget.Toast; | ||||
| 
 | ||||
| import java.io.IOException; | ||||
| 
 | ||||
|  | @ -44,6 +46,7 @@ import fr.free.nrw.commons.contributions.ContributionsActivity; | |||
| import fr.free.nrw.commons.di.ApplicationlessInjection; | ||||
| import fr.free.nrw.commons.mwapi.MediaWikiApi; | ||||
| import fr.free.nrw.commons.theme.NavigationBaseActivity; | ||||
| import fr.free.nrw.commons.ui.widget.HtmlTextView; | ||||
| import io.reactivex.Observable; | ||||
| import io.reactivex.android.schedulers.AndroidSchedulers; | ||||
| import io.reactivex.schedulers.Schedulers; | ||||
|  | @ -73,7 +76,9 @@ public class LoginActivity extends AccountAuthenticatorActivity { | |||
|     @BindView(R.id.error_message_container) ViewGroup errorMessageContainer; | ||||
|     @BindView(R.id.error_message) TextView errorMessage; | ||||
|     @BindView(R.id.login_credentials) TextView loginCredentials; | ||||
|     @BindView(R.id.two_factor_container)TextInputLayout twoFactorContainer; | ||||
|     @BindView(R.id.two_factor_container) TextInputLayout twoFactorContainer; | ||||
|     @BindView(R.id.forgotPassword) HtmlTextView forgotPasswordText; | ||||
| 
 | ||||
|     ProgressDialog progressDialog; | ||||
|     private AppCompatDelegate delegate; | ||||
|     private LoginTextWatcher textWatcher = new LoginTextWatcher(); | ||||
|  | @ -114,6 +119,8 @@ public class LoginActivity extends AccountAuthenticatorActivity { | |||
|         loginButton.setOnClickListener(view -> performLogin()); | ||||
|         signupButton.setOnClickListener(view -> signUp()); | ||||
| 
 | ||||
|         forgotPasswordText.setOnClickListener(view -> forgotPassword()); | ||||
| 
 | ||||
|         if(BuildConfig.FLAVOR == "beta"){ | ||||
|             loginCredentials.setText(getString(R.string.login_credential)); | ||||
|         } else { | ||||
|  | @ -121,6 +128,10 @@ public class LoginActivity extends AccountAuthenticatorActivity { | |||
|         } | ||||
|     } | ||||
| 
 | ||||
|     private void forgotPassword() { | ||||
|         Utils.handleWebUrl(this, Uri.parse(BuildConfig.FORGOT_PASSWORD_URL)); | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     public void hideKeyboard(View view) { | ||||
|         InputMethodManager inputMethodManager =(InputMethodManager)this.getSystemService(Activity.INPUT_METHOD_SERVICE); | ||||
|  |  | |||
|  | @ -10,7 +10,7 @@ import android.content.pm.PackageManager; | |||
| import android.net.Uri; | ||||
| import android.os.Build; | ||||
| import android.os.Bundle; | ||||
| import android.preference.CheckBoxPreference; | ||||
| import android.preference.SwitchPreference; | ||||
| import android.preference.EditTextPreference; | ||||
| import android.preference.ListPreference; | ||||
| import android.preference.Preference; | ||||
|  | @ -59,7 +59,7 @@ public class SettingsFragment extends PreferenceFragment { | |||
|             return true; | ||||
|         }); | ||||
| 
 | ||||
|         CheckBoxPreference themePreference = (CheckBoxPreference) findPreference("theme"); | ||||
|         SwitchPreference themePreference = (SwitchPreference) findPreference("theme"); | ||||
|         themePreference.setOnPreferenceChangeListener((preference, newValue) -> { | ||||
|             getActivity().recreate(); | ||||
|             return true; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Suchit Kar
						Suchit Kar