mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Rename layout for better visibility
This commit is contained in:
@@ -37,7 +37,7 @@ class AboutActivity : StylishActivity() {
|
||||
public override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
setContentView(R.layout.about)
|
||||
setContentView(R.layout.activity_about)
|
||||
|
||||
val toolbar = findViewById<Toolbar>(R.id.toolbar)
|
||||
toolbar.title = getString(R.string.menu_about)
|
||||
|
||||
@@ -70,7 +70,7 @@ class EntryActivity : LockingHideActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
setContentView(R.layout.entry_view)
|
||||
setContentView(R.layout.activity_entry)
|
||||
|
||||
toolbar = findViewById(R.id.toolbar)
|
||||
setSupportActionBar(toolbar)
|
||||
|
||||
@@ -69,7 +69,7 @@ class EntryEditActivity : LockingHideActivity(), IconPickerDialogFragment.IconPi
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.entry_edit)
|
||||
setContentView(R.layout.activity_entry_edit)
|
||||
|
||||
val toolbar = findViewById<Toolbar>(R.id.toolbar)
|
||||
setSupportActionBar(toolbar)
|
||||
|
||||
@@ -104,7 +104,7 @@ class FileDatabaseSelectActivity : StylishActivity(),
|
||||
|
||||
mFileDatabaseHistory = FileDatabaseHistory.getInstance(WeakReference(applicationContext))
|
||||
|
||||
setContentView(R.layout.file_selection)
|
||||
setContentView(R.layout.activity_file_selection)
|
||||
fileListContainer = findViewById(R.id.container_file_list)
|
||||
|
||||
val toolbar = findViewById<Toolbar>(R.id.toolbar)
|
||||
|
||||
@@ -42,7 +42,6 @@ import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import com.kunzisoft.keepass.R
|
||||
import com.kunzisoft.keepass.activities.dialogs.*
|
||||
import com.kunzisoft.keepass.activities.helpers.EntrySelectionHelper
|
||||
@@ -112,7 +111,7 @@ class GroupActivity : LockingActivity(),
|
||||
mDatabase = App.currentDatabase
|
||||
|
||||
// Construct main view
|
||||
setContentView(layoutInflater.inflate(R.layout.list_nodes_with_add_button, null))
|
||||
setContentView(layoutInflater.inflate(R.layout.activity_group, null))
|
||||
|
||||
// Initialize views
|
||||
iconView = findViewById(R.id.icon)
|
||||
|
||||
@@ -118,7 +118,7 @@ class ListNodesFragment : StylishFragment(), SortDialogFragment.SortSelectionLis
|
||||
|
||||
// To apply theme
|
||||
val rootView = inflater.cloneInContext(contextThemed)
|
||||
.inflate(R.layout.list_nodes_fragment, container, false)
|
||||
.inflate(R.layout.fragment_list_nodes, container, false)
|
||||
listView = rootView.findViewById(R.id.nodes_list)
|
||||
notFoundView = rootView.findViewById(R.id.not_found_container)
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ class PasswordActivity : StylishActivity(),
|
||||
mRememberKeyFile = prefs!!.getBoolean(getString(R.string.keyfile_key),
|
||||
resources.getBoolean(R.bool.keyfile_default))
|
||||
|
||||
setContentView(R.layout.password)
|
||||
setContentView(R.layout.activity_password)
|
||||
|
||||
toolbar = findViewById(R.id.toolbar)
|
||||
toolbar?.title = getString(R.string.app_name)
|
||||
|
||||
@@ -76,7 +76,7 @@ class AssignMasterKeyDialogFragment : DialogFragment() {
|
||||
val builder = AlertDialog.Builder(activity)
|
||||
val inflater = activity.layoutInflater
|
||||
|
||||
rootView = inflater.inflate(R.layout.set_password, null)
|
||||
rootView = inflater.inflate(R.layout.fragment_set_password, null)
|
||||
builder.setView(rootView)
|
||||
.setTitle(R.string.assign_master_key)
|
||||
// Add action buttons
|
||||
|
||||
@@ -33,7 +33,7 @@ class BrowserDialogFragment : DialogFragment() {
|
||||
activity?.let { activity ->
|
||||
val builder = AlertDialog.Builder(activity)
|
||||
// Get the layout inflater
|
||||
val root = activity.layoutInflater.inflate(R.layout.browser_install, null)
|
||||
val root = activity.layoutInflater.inflate(R.layout.fragment_browser_install, null)
|
||||
builder.setView(root)
|
||||
.setNegativeButton(R.string.cancel) { _, _ -> }
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ class CreateFileDialogFragment : DialogFragment(), AdapterView.OnItemSelectedLis
|
||||
val builder = AlertDialog.Builder(activity)
|
||||
val inflater = activity.layoutInflater
|
||||
|
||||
val rootView = inflater.inflate(R.layout.file_creation, null)
|
||||
val rootView = inflater.inflate(R.layout.fragment_file_creation, null)
|
||||
builder.setView(rootView)
|
||||
.setTitle(R.string.create_keepass_file)
|
||||
// Add action buttons
|
||||
|
||||
@@ -39,7 +39,7 @@ class FileInformationDialogFragment : DialogFragment() {
|
||||
activity?.let { activity ->
|
||||
val builder = AlertDialog.Builder(activity)
|
||||
val inflater = activity.layoutInflater
|
||||
val root = inflater.inflate(R.layout.file_selection_information, null)
|
||||
val root = inflater.inflate(R.layout.fragment_file_selection_information, null)
|
||||
val fileNameView = root.findViewById<TextView>(R.id.file_filename)
|
||||
val filePathView = root.findViewById<TextView>(R.id.file_path)
|
||||
fileSizeContainerView = root.findViewById(R.id.file_size_container)
|
||||
|
||||
@@ -29,7 +29,6 @@ import android.widget.*
|
||||
import com.kunzisoft.keepass.R
|
||||
import com.kunzisoft.keepass.password.PasswordGenerator
|
||||
import com.kunzisoft.keepass.settings.PreferencesUtil
|
||||
import com.kunzisoft.keepass.utils.Util
|
||||
import com.kunzisoft.keepass.utils.applyFontVisibility
|
||||
|
||||
class GeneratePasswordDialogFragment : DialogFragment() {
|
||||
@@ -64,7 +63,7 @@ class GeneratePasswordDialogFragment : DialogFragment() {
|
||||
activity?.let { activity ->
|
||||
val builder = AlertDialog.Builder(activity)
|
||||
val inflater = activity.layoutInflater
|
||||
root = inflater.inflate(R.layout.generate_password, null)
|
||||
root = inflater.inflate(R.layout.fragment_generate_password, null)
|
||||
|
||||
passwordView = root?.findViewById(R.id.password)
|
||||
passwordView?.applyFontVisibility()
|
||||
|
||||
@@ -79,7 +79,7 @@ class GroupEditDialogFragment : DialogFragment(), IconPickerDialogFragment.IconP
|
||||
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
activity?.let { activity ->
|
||||
val root = activity.layoutInflater.inflate(R.layout.group_edit, null)
|
||||
val root = activity.layoutInflater.inflate(R.layout.fragment_group_edit, null)
|
||||
nameTextLayoutView = root?.findViewById(R.id.group_edit_name_container)
|
||||
nameTextView = root?.findViewById(R.id.group_edit_name)
|
||||
iconButtonView = root?.findViewById(R.id.group_edit_icon_button)
|
||||
|
||||
@@ -64,7 +64,7 @@ class IconPickerDialogFragment : DialogFragment() {
|
||||
|
||||
// Inflate and set the layout for the dialog
|
||||
// Pass null as the parent view because its going in the dialog layout
|
||||
val root = activity.layoutInflater.inflate(R.layout.icon_picker, null)
|
||||
val root = activity.layoutInflater.inflate(R.layout.fragment_icon_picker, null)
|
||||
builder.setView(root)
|
||||
|
||||
val currIconGridView = root.findViewById<GridView>(R.id.IconGridView)
|
||||
@@ -101,7 +101,7 @@ class IconPickerDialogFragment : DialogFragment() {
|
||||
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {
|
||||
val currentView: View = convertView
|
||||
?: (context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater)
|
||||
.inflate(R.layout.icon, parent, false)
|
||||
.inflate(R.layout.item_icon, parent, false)
|
||||
|
||||
iconPack?.let { iconPack ->
|
||||
val iconImageView = currentView.findViewById<ImageView>(R.id.icon_image)
|
||||
|
||||
@@ -38,7 +38,7 @@ class KeyboardExplanationDialogFragment : DialogFragment() {
|
||||
val builder = AlertDialog.Builder(activity!!)
|
||||
val inflater = activity!!.layoutInflater
|
||||
|
||||
val rootView = inflater.inflate(R.layout.keyboard_explanation, null)
|
||||
val rootView = inflater.inflate(R.layout.fragment_keyboard_explanation, null)
|
||||
|
||||
rootView.findViewById<View>(R.id.keyboards_activate_setting_path1_text)
|
||||
.setOnClickListener { launchActivateKeyboardSetting() }
|
||||
|
||||
@@ -80,7 +80,7 @@ class SortDialogFragment : DialogFragment() {
|
||||
|
||||
mCheckedId = retrieveViewFromEnum(mSortNodeEnum!!)
|
||||
|
||||
val rootView = activity.layoutInflater.inflate(R.layout.sort_selection, null)
|
||||
val rootView = activity.layoutInflater.inflate(R.layout.fragment_sort_selection, null)
|
||||
builder.setTitle(R.string.sort_menu)
|
||||
builder.setView(rootView)
|
||||
// Add action buttons
|
||||
|
||||
@@ -40,7 +40,7 @@ class UnavailableFeatureDialogFragment : DialogFragment() {
|
||||
minVersionRequired = getInt(MIN_REQUIRED_VERSION_ARG)
|
||||
}
|
||||
|
||||
val rootView = activity.layoutInflater.inflate(R.layout.unavailable_feature, null)
|
||||
val rootView = activity.layoutInflater.inflate(R.layout.fragment_unavailable_feature, null)
|
||||
val messageView = rootView.findViewById<TextView>(R.id.unavailable_feature_message)
|
||||
|
||||
val builder = AlertDialog.Builder(activity)
|
||||
|
||||
@@ -55,7 +55,7 @@ class FileDatabaseHistoryAdapter(private val context: Context, private val listF
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): FileDatabaseHistoryViewHolder {
|
||||
val view = inflater.inflate(R.layout.file_row, parent, false)
|
||||
val view = inflater.inflate(R.layout.item_file_row, parent, false)
|
||||
return FileDatabaseHistoryViewHolder(view)
|
||||
}
|
||||
|
||||
|
||||
@@ -189,9 +189,9 @@ class NodeAdapter
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): NodeViewHolder {
|
||||
val view: View = if (viewType == Type.GROUP.ordinal) {
|
||||
inflater.inflate(R.layout.list_nodes_group, parent, false)
|
||||
inflater.inflate(R.layout.item_list_nodes_group, parent, false)
|
||||
} else {
|
||||
inflater.inflate(R.layout.list_nodes_entry, parent, false)
|
||||
inflater.inflate(R.layout.item_list_nodes_entry, parent, false)
|
||||
}
|
||||
return NodeViewHolder(view)
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ class SearchEntryCursorAdapter(context: Context, private val database: Database)
|
||||
|
||||
override fun newView(context: Context, cursor: Cursor, parent: ViewGroup): View {
|
||||
|
||||
val view = cursorInflater.inflate(R.layout.search_entry, parent, false)
|
||||
val view = cursorInflater.inflate(R.layout.item_search_entry, parent, false)
|
||||
val viewHolder = ViewHolder()
|
||||
viewHolder.imageViewIcon = view.findViewById(R.id.entry_icon)
|
||||
viewHolder.textViewTitle = view.findViewById(R.id.entry_text)
|
||||
|
||||
@@ -141,7 +141,7 @@ object AutofillHelper {
|
||||
}
|
||||
|
||||
private fun newRemoteViews(packageName: String, remoteViewsText: String): RemoteViews {
|
||||
val presentation = RemoteViews(packageName, R.layout.autofill_service_list_item)
|
||||
val presentation = RemoteViews(packageName, R.layout.item_autofill_service)
|
||||
presentation.setTextViewText(R.id.text, remoteViewsText)
|
||||
return presentation
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ class KeeAutofillService : AutofillService() {
|
||||
// If the entire Autofill Response is authenticated, AuthActivity is used
|
||||
// to generate Response.
|
||||
val sender = AutofillLauncherActivity.getAuthIntentSenderForResponse(this)
|
||||
val presentation = RemoteViews(packageName, R.layout.autofill_service_unlock)
|
||||
val presentation = RemoteViews(packageName, R.layout.item_autofill_service_unlock)
|
||||
responseBuilder.setAuthentication(autofillIds, sender, presentation)
|
||||
callback.onSuccess(responseBuilder.build())
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ class FingerPrintExplanationDialog : DialogFragment() {
|
||||
val builder = AlertDialog.Builder(activity)
|
||||
val inflater = activity.layoutInflater
|
||||
|
||||
val rootView = inflater.inflate(R.layout.fingerprint_explanation, null)
|
||||
val rootView = inflater.inflate(R.layout.fragment_fingerprint_explanation, null)
|
||||
|
||||
val fingerprintSettingWayTextView = rootView.findViewById<View>(R.id.fingerprint_setting_way_text)
|
||||
fingerprintSettingWayTextView.setOnClickListener { startActivity(Intent(android.provider.Settings.ACTION_SECURITY_SETTINGS)) }
|
||||
|
||||
@@ -31,7 +31,6 @@ import android.view.View
|
||||
import android.widget.ProgressBar
|
||||
import android.widget.TextView
|
||||
import com.kunzisoft.keepass.R
|
||||
import com.kunzisoft.keepass.utils.Util
|
||||
import com.kunzisoft.keepass.utils.lockScreenOrientation
|
||||
import com.kunzisoft.keepass.utils.unlockScreenOrientation
|
||||
|
||||
@@ -59,7 +58,7 @@ open class ProgressTaskDialogFragment : DialogFragment(), ProgressTaskUpdater {
|
||||
// Inflate and set the layout for the dialog
|
||||
// Pass null as the parent view because its going in the dialog layout
|
||||
@SuppressLint("InflateParams")
|
||||
val root = inflater.inflate(R.layout.progress_dialog, null)
|
||||
val root = inflater.inflate(R.layout.fragment_progress, null)
|
||||
builder.setView(root)
|
||||
|
||||
titleView = root.findViewById(R.id.progress_dialog_title)
|
||||
|
||||
@@ -68,7 +68,7 @@ class AddNodeButtonView @JvmOverloads constructor(context: Context, attrs: Attri
|
||||
|
||||
private fun inflate(context: Context) {
|
||||
val inflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
|
||||
inflater.inflate(R.layout.add_node_button, this)
|
||||
inflater.inflate(R.layout.view_button_add_node, this)
|
||||
|
||||
addEntryEnable = true
|
||||
addGroupEnable = true
|
||||
|
||||
@@ -72,7 +72,7 @@ class EntryContentsView @JvmOverloads constructor(context: Context, attrs: Attri
|
||||
|
||||
init {
|
||||
val inflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
|
||||
inflater.inflate(R.layout.entry_view_contents, this)
|
||||
inflater.inflate(R.layout.view_entry_contents, this)
|
||||
|
||||
userNameContainerView = findViewById(R.id.entry_user_name_container)
|
||||
userNameView = findViewById(R.id.entry_user_name)
|
||||
|
||||
@@ -49,7 +49,7 @@ open class EntryCustomField(context: Context,
|
||||
init {
|
||||
|
||||
val inflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
|
||||
inflater.inflate(R.layout.entry_new_field, this)
|
||||
inflater.inflate(R.layout.view_entry_new_field, this)
|
||||
|
||||
labelView = findViewById(R.id.title)
|
||||
valueView = findViewById(R.id.value)
|
||||
|
||||
@@ -40,7 +40,7 @@ class EntryEditContentsView @JvmOverloads constructor(context: Context, attrs: A
|
||||
|
||||
init {
|
||||
val inflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
|
||||
inflater.inflate(R.layout.entry_edit_view_contents, this)
|
||||
inflater.inflate(R.layout.view_entry_edit_contents, this)
|
||||
|
||||
entryTitleLayoutView = findViewById(R.id.entry_edit_container_title)
|
||||
entryTitleView = findViewById(R.id.entry_edit_title)
|
||||
|
||||
@@ -56,7 +56,7 @@ class EntryEditCustomField @JvmOverloads constructor(context: Context,
|
||||
init {
|
||||
|
||||
val inflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
|
||||
inflater.inflate(R.layout.entry_edit_new_field, this)
|
||||
inflater.inflate(R.layout.view_entry_edit_new_field, this)
|
||||
|
||||
val deleteView = findViewById<View>(R.id.entry_edit_new_field_delete)
|
||||
deleteView.setOnClickListener { deleteViewFromParent() }
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/root_view"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/transparent" />
|
||||
Reference in New Issue
Block a user