Update layout names

This commit is contained in:
SerpentSpirale 2022-03-08 18:11:22 +01:00 committed by ArtDev
parent b6c250cadd
commit e61b811545
33 changed files with 18 additions and 27 deletions

View file

@ -47,7 +47,7 @@ public class LoggerView extends ConstraintLayout {
* Inflate the layout, and add component behaviors
*/
private void init(){
inflate(getContext(), R.layout.loggerview_layout, this);
inflate(getContext(), R.layout.view_logger, this);
mLogTextView = findViewById(R.id.content_log_view);
mLogTextView.setTypeface(Typeface.MONOSPACE);
//TODO clamp the max text so it doesn't go oob

View file

@ -342,7 +342,7 @@ public class BaseMainActivity extends BaseActivity {
public void adjustMouseSpeedLive() {
AlertDialog.Builder b = new AlertDialog.Builder(this);
b.setTitle(R.string.mcl_setting_title_mousespeed);
View v = LayoutInflater.from(this).inflate(R.layout.live_mouse_speed_editor,null);
View v = LayoutInflater.from(this).inflate(R.layout.dialog_live_mouse_speed_editor,null);
final SeekBar sb = v.findViewById(R.id.mouseSpeed);
final TextView tv = v.findViewById(R.id.mouseSpeedTV);
sb.setMax(275);

View file

@ -36,7 +36,7 @@ public class CustomControlsActivity extends BaseActivity {
// setTheme(androidx.appcompat.R.style.Theme_AppCompat_Translucent);
}
setContentView(R.layout.control_mapping);
setContentView(R.layout.activity_custom_controls);
mControlLayout = (ControlLayout) findViewById(R.id.customctrl_controllayout);
mDrawerLayout = (DrawerLayout) findViewById(R.id.customctrl_drawerlayout);

View file

@ -43,7 +43,7 @@ public class ImportControlActivity extends Activity {
super.onCreate(savedInstanceState);
Tools.initContextConstants(getApplicationContext());
setContentView(R.layout.import_control_layout);
setContentView(R.layout.activity_import_control);
mEditText = findViewById(R.id.editText_import_control_file_name);
}

View file

@ -4,7 +4,6 @@ import android.annotation.SuppressLint;
import android.os.*;
import android.util.*;
import android.view.*;
import android.view.View.*;
import android.widget.*;
import java.io.*;
@ -38,7 +37,7 @@ public class JavaGUILauncherActivity extends BaseActivity implements View.OnTouc
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.install_mod);
setContentView(R.layout.activity_java_gui_launcher);
Logger.getInstance().reset();

View file

@ -5,8 +5,6 @@ import android.content.Intent;
import android.os.*;
import androidx.annotation.Nullable;
import net.kdt.pojavlaunch.customcontrols.*;
import net.kdt.pojavlaunch.prefs.*;
import net.kdt.pojavlaunch.utils.MCOptionUtils;
@ -15,7 +13,6 @@ import java.io.*;
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.DEFAULT_PREF;
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.PREF_SUSTAINED_PERFORMANCE;
import static net.kdt.pojavlaunch.utils.MCOptionUtils.getMcScale;
public class MainActivity extends BaseMainActivity {
public static ControlLayout mControlLayout;
@ -25,7 +22,7 @@ public class MainActivity extends BaseMainActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
initLayout(R.layout.main_with_customctrl);
initLayout(R.layout.activity_basemain);
// Set the sustained performance mode for available APIs
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)

View file

@ -84,7 +84,7 @@ public class PojavLauncherActivity extends BaseLauncherActivity
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.launcher_main_v4);
setContentView(R.layout.activity_pojav_launcher);
//Boilerplate linking/initialisation
viewPager = findViewById(R.id.launchermainTabPager);

View file

@ -10,10 +10,7 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.content.res.AssetManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ColorDrawable;
import android.net.Uri;
import android.os.Build;
@ -22,7 +19,6 @@ import android.text.Html;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.style.StyleSpan;
import android.util.Base64;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
@ -171,7 +167,7 @@ public class PojavLoginActivity extends BaseActivity {
}
}
private void uiInit() {
setContentView(R.layout.launcher_login_v3);
setContentView(R.layout.activity_pojav_login);
Spinner spinnerChgLang = findViewById(R.id.login_spinner_language);
@ -494,14 +490,14 @@ public class PojavLoginActivity extends BaseActivity {
final Dialog accountDialog = new Dialog(PojavLoginActivity.this);
accountDialog.setContentView(R.layout.simple_account_list_holder);
accountDialog.setContentView(R.layout.dialog_select_account);
LinearLayout accountListLayout = accountDialog.findViewById(R.id.accountListLayout);
LayoutInflater inflater = (LayoutInflater) this.getSystemService(LAYOUT_INFLATER_SERVICE);
for (int accountIndex = 0; accountIndex < accountArr.length; accountIndex++) {
String s = accountArr[accountIndex];
View child = inflater.inflate(R.layout.simple_account_list_item, accountListLayout,false);
View child = inflater.inflate(R.layout.item_minecraft_account, accountListLayout,false);
TextView accountName = child.findViewById(R.id.accountitem_text_name);
ImageButton removeButton = child.findViewById(R.id.accountitem_button_remove);
ImageView imageView = child.findViewById(R.id.account_head);

View file

@ -79,7 +79,7 @@ public class EditControlButtonPopup {
protected void initializeEditDialog(Context ctx){
//Create the editing dialog
LayoutInflater layoutInflater = (LayoutInflater) ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
mRootView = layoutInflater.inflate(R.layout.control_button_setting,null);
mRootView = layoutInflater.inflate(R.layout.dialog_control_button_setting,null);
mBuilder = new AlertDialog.Builder(ctx);
mBuilder.setTitle(ctx.getResources().getString(R.string.customctrl_edit, mProperties.name));

View file

@ -19,7 +19,7 @@ public class ConsoleFragment extends Fragment {
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState);
View view = inflater.inflate(R.layout.lmaintab_consolelog, container, false);
View view = inflater.inflate(R.layout.fragment_console_log, container, false);
mConsoleView = (TextView) view.findViewById(R.id.lmaintabconsoleLogTextView);
mConsoleView.setTypeface(Typeface.MONOSPACE);

View file

@ -23,7 +23,7 @@ public class CrashFragment extends Fragment {
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState);
return inflater.inflate(R.layout.lmaintab_crashlog, container, false);
return inflater.inflate(R.layout.fragment_crash_log, container, false);
}
@Override

View file

@ -39,7 +39,7 @@ public class LauncherFragment extends Fragment {
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState);
mRootView = inflater.inflate(R.layout.lmaintab_news, container, false);
mRootView = inflater.inflate(R.layout.fragment_news, container, false);
return mRootView;
}

View file

@ -32,7 +32,7 @@ public class RTRecyclerViewAdapter extends RecyclerView.Adapter<RTRecyclerViewAd
@NonNull
@Override
public RTViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View recyclableView = LayoutInflater.from(parent.getContext()).inflate(R.layout.multirt_recyclable_view,parent,false);
View recyclableView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_multirt_runtime,parent,false);
return new RTViewHolder(recyclableView);
}

View file

@ -61,7 +61,7 @@ public class RTSpinnerAdapter implements SpinnerAdapter {
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
View view = convertView != null?
convertView:
LayoutInflater.from(mContext).inflate(R.layout.multirt_recyclable_view,parent,false);
LayoutInflater.from(mContext).inflate(R.layout.item_multirt_runtime,parent,false);
Runtime runtime = mRuntimes.get(position);

View file

@ -115,7 +115,7 @@ public class ControlOffsetPreference extends Preference {
// Prepare Alert dialog
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(getContext());
dialogBuilder.setView(R.layout.control_offset_preference_dialog);
dialogBuilder.setView(R.layout.dialog_control_offset_preference);
dialogBuilder.setTitle(getContext().getString(R.string.control_offset_title));
dialogBuilder.setPositiveButton(android.R.string.ok, null);

View file

@ -19,7 +19,6 @@ import net.kdt.pojavlaunch.value.PerVersionConfig;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
@ -37,7 +36,7 @@ public class PerVersionConfigDialog{
public PerVersionConfigDialog(Context ctx) {
mContext = ctx;
mRootView = LayoutInflater.from(mContext).inflate(R.layout.pvc_popup,null);
mRootView = LayoutInflater.from(mContext).inflate(R.layout.dialog_per_version_control,null);
mJvmSpinner = mRootView.findViewById(R.id.pvc_javaVm);
mRendererSpinner = mRootView.findViewById(R.id.pvc_renderer);