forked from openMF/mifos-mobile-cn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed openMF#169 setting is empty and white
- Loading branch information
Showing
14 changed files
with
326 additions
and
151 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
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
80 changes: 80 additions & 0 deletions
80
app/src/main/kotlin/org/mifos/mobile/cn/ui/mifos/settings/SettingActivity.kt
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,80 @@ | ||
package org.mifos.mobile.cn.ui.mifos.settings | ||
|
||
|
||
import android.content.DialogInterface | ||
import android.content.Intent | ||
import android.os.Build | ||
import android.os.Bundle | ||
import android.provider.MediaStore | ||
import android.view.Menu | ||
import android.view.MenuItem | ||
import android.view.View | ||
import android.widget.Toast | ||
import android.widget.Toolbar | ||
import androidx.annotation.RequiresApi | ||
import androidx.appcompat.app.AlertDialog | ||
import androidx.appcompat.app.AppCompatActivity | ||
import kotlinx.android.synthetic.main.activity_customer_profile.* | ||
import kotlinx.android.synthetic.main.toolbar.* | ||
import org.mifos.mobile.cn.ui.utils.* | ||
import org.mifos.mobile.cn.R | ||
import org.mifos.mobile.cn.data.local.PreferencesHelper | ||
import org.mifos.mobile.cn.ui.mifos.DashboardActivity | ||
import org.mifos.mobile.cn.ui.mifos.aboutus.AboutUsActivity | ||
import org.mifos.mobile.cn.ui.mifos.customerProfile.CustomerProfileContract | ||
import org.mifos.mobile.cn.ui.mifos.login.LoginActivity | ||
import javax.inject.Inject | ||
|
||
|
||
class SettingActivity : AppCompatActivity() { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_setting) | ||
} | ||
|
||
fun notificationAct(view: View) { | ||
|
||
} | ||
fun about_ac(view: View) { | ||
val intent = Intent(this, AboutUsActivity::class.java) | ||
startActivity(intent) | ||
} | ||
fun helpAc(view: View) { | ||
|
||
} | ||
fun logout(view: View) { | ||
MaterialDialog.Builder().init(this) | ||
.setMessage(R.string.dialog_logout) | ||
.setPositiveButton(getString(R.string.logout), | ||
DialogInterface.OnClickListener { dialog, which -> | ||
val intent = Intent(this, LoginActivity::class.java) | ||
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK | ||
startActivity(intent) | ||
finish() | ||
//Show successful logout Toast. | ||
Toast.makeText(applicationContext, "Logged Out Successfully", Toast.LENGTH_SHORT).show() | ||
}) | ||
.setNegativeButton(getString(R.string.cancel), | ||
DialogInterface.OnClickListener { dialog, which -> | ||
Toast.makeText(applicationContext, "Canceled Successfully!", Toast.LENGTH_SHORT).show() | ||
|
||
}) | ||
.createMaterialDialog() | ||
.show() | ||
} | ||
|
||
fun share(view: View) { | ||
val sharingIntent = Intent(android.content.Intent.ACTION_SEND) | ||
sharingIntent.type = "text/plain" | ||
sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, getString(R.string.app_link)) | ||
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, getString(R.string.share_message)) | ||
startActivity(Intent.createChooser(sharingIntent, getString(R.string.share_the_app_link))) | ||
} | ||
|
||
fun back(view: View) { | ||
val intent = Intent(this, DashboardActivity::class.java) | ||
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK | ||
startActivity(intent) | ||
} | ||
} | ||
|
41 changes: 0 additions & 41 deletions
41
app/src/main/kotlin/org/mifos/mobile/cn/ui/mifos/settings/SettingsFragment.kt
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
app/src/main/res/drawable/ic_baseline_keyboard_backspace_24.xml
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,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="24.0" | ||
android:viewportHeight="24.0"> | ||
<path | ||
android:fillColor="@color/white" | ||
android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z" /> | ||
</vector> |
Oops, something went wrong.