[Solved] How to equal button text with the addition of two button text

Your code looks right, I think. Maybe you could try the following: String btn12 = button1Text + button2Text; if(btn12.equals(button3Text)) { return true; } For debug purposes you could log buttonText1, buttonText2, buttonText3 and the concat string btn12. Do they really have the same content? Update: Ahh okay the strings contains numbers and you want to … Read more

[Solved] How to get a specific given in Firebase [closed]

First of all initiate the database instance FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance(); get the reference of your DB where you want to perform the operation DatabaseReference dbRef = firebaseDatabase.getReference(NAME_OF_DATABASE); then use this to get all the user with the name equal to the editText text Query query = profileDbRef .orderByChild(“name”) .equalTo(edittext.getText().toString()); query.addValueEventListener(new ValueEventListener() { @Override public … Read more

[Solved] App crahing when Button declared outside onCreate method [duplicate]

If you want a reference to your button globally then you should declare it outside then initialize it in onCreate Button b1; //declare the button variable public class SharedPreferencesActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_shared_preferences); b1 = (Button) findViewById(R.id.buttonSave); //initialize on creation } You should read more into the basics … Read more

[Solved] how create overlay EditText in Activity [closed]

Wel come to Stackoverflow. Its not Dialog. its Activity as a dialog public class diaActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub requestWindowFeature(Window.FEATURE_NO_TITLE); super.onCreate(savedInstanceState); setContentView(R.layout.test_dialog); } } test_dialog.xml <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:background=”#FFFFFF” android:orientation=”vertical” > <LinearLayout android:layout_width=”match_parent” android:layout_height=”42dp” android:orientation=”horizontal” android:weightSum=”3″ > <Button android:id=”@+id/button1″ android:layout_width=”0dp” android:layout_height=”wrap_content” android:layout_weight=”1″ android:text=”Cancle” /> … Read more

[Solved] App stop working

Caused by: java.lang.NoSuchMethodException: <init> [class android.content.Context, interface android.util.AttributeSet] 01-19 10:43:19.400: E/AndroidRuntime(1482): at java.lang.Class.getConstructorOrMethod(Class.java:472) You are not providing all of the constructors required for a custom view. Specifically, add this constructor. Read the documentation and tutorials for how to use the attribute set: public JustifiedTextView(Context context, AttributeSet attrs){ super(context, attrs); this.setWebChromeClient(new WebChromeClient() { }); } 2 … Read more

[Solved] How to run my Intent if file exists [closed]

Looks like you forgot an else statement and I modified your intent a little: if (!file.exists()) { Toast.makeText(MyActivity.this, ” the file not found”,Toast.LENGTH_LONG).show(); } else { Intent intent = new Intent(MyActivity.this,BooksActivity.class ); startActivity(intent); } 3 solved How to run my Intent if file exists [closed]

[Solved] Set value for Spinner with custom Adapter in Android

@Haresh Chhelana example is good, However if you want to show both name and code in spinner after selecting, check this out. List<Map<String, String>> items = new ArrayList<Map<String, String>>(); for (int i = 0; i < JA.length(); i++) { json = JA.getJSONObject(i); mapData = new HashMap<String, String>(); mapData.put(“name”, json.getString(“Name”)); mapData.put(“code”, json.getString(“Code”)); items.add(mapData); } SimpleAdapter adapter … Read more

[Solved] ActivityNotFoundException: Unable to find explicit activity class {co.edu.unimagdalena.projecto/co.edu.unimagdalena.projecto.informacion2}

ActivityNotFoundException: Unable to find explicit activity class {co.edu.unimagdalena.projecto/co.edu.unimagdalena.projecto.informacion2} solved ActivityNotFoundException: Unable to find explicit activity class {co.edu.unimagdalena.projecto/co.edu.unimagdalena.projecto.informacion2}

[Solved] card view shadow effect only top side react native [closed]

install this librery npm i react-native-drop-shadow import this line import DropShadow from “react-native-drop-shadow”; use this view ginv to shasow <DropShadow style={{ shadowColor: “#000”, shadowOffset: { width: 0, height: 0, }, shadowOpacity: 1, shadowRadius: 5, }} > —– Your Contain ————– </DropShadow> solved card view shadow effect only top side react native [closed]