Click here to Skip to main content
15,886,689 members
Home / Discussions / Android
   

Android

 
QuestionRe: Android read file from url Pin
David Crow12-May-17 10:06
David Crow12-May-17 10:06 
QuestionAndroid Shopping Cart Pin
Member 1319622012-May-17 2:52
Member 1319622012-May-17 2:52 
AnswerRe: Android Shopping Cart Pin
Richard MacCutchan12-May-17 3:13
mveRichard MacCutchan12-May-17 3:13 
QuestionRe: Android Shopping Cart Pin
David Crow12-May-17 9:48
David Crow12-May-17 9:48 
QuestionCorrect MVVM implementation to manually login to website, go to certain link in the website, read information from html element and display it in another View. Pin
JoJo8210-May-17 6:15
JoJo8210-May-17 6:15 
AnswerRe: Correct MVVM implementation to manually login to website, go to certain link in the website, read information from html element and display it in another View. Pin
Richard MacCutchan10-May-17 6:41
mveRichard MacCutchan10-May-17 6:41 
GeneralRe: Correct MVVM implementation to manually login to website, go to certain link in the website, read information from html element and display it in another View. Pin
JoJo8210-May-17 12:07
JoJo8210-May-17 12:07 
QuestionPrevious fragment visible under the new fragment issue Pin
Pavlex46-May-17 7:59
Pavlex46-May-17 7:59 
I have created android application with navigation drawer and when I click item from navigation drawer old fragment is not replaced,I can still see the old fragment under the new fragment.How to fix this issue?

Java
private void displaySelectedScreen(int id)
        {
            Fragment fragment = null;
    
            switch (id)
            {
                case R.id.home:
                    fragment = new Main();
                    break;
                case R.id.settings:
                    Intent intent = new Intent(this, Settings.class);
                    startActivity(intent);
                    break;
                case R.id.about:
                    Intent intent1 = new Intent(this, About.class);
                    startActivity(intent1);
                    break;
                case R.id.share:
                    try
                    {
                        Intent i = new Intent(Intent.ACTION_SEND);
                        i.setType("text/plain");
                        i.putExtra(Intent.EXTRA_SUBJECT, "Audiophileradio");
                        String sAux = "\nLet me recommend you this application\n\n";
                        sAux = sAux + "https://play.google.com/store/apps/details?id=Orion.Soft \n\n";
                        i.putExtra(Intent.EXTRA_TEXT, sAux);
                        startActivity(Intent.createChooser(i, "choose one"));
                    }
                    catch(Exception e)
                    {
                        //e.toString();
                    }
                    break;
                case R.id.send:
                    fragment = new Feedback();
                    break;
            }
            if (fragment != null)
            {
                FragmentManager fragmentManager = getSupportFragmentManager();
                fragmentManager.beginTransaction()
                        .replace(R.id.contentFrame, fragment).commit();
            }
    
            DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
            drawer.closeDrawer(GravityCompat.START);
        }
    
        @SuppressWarnings("StatementWithEmptyBody")
        @Override
        public boolean onNavigationItemSelected(MenuItem item)
        {
            // Handle navigation view item clicks here.
            int id = item.getItemId();
    
            displaySelectedScreen(id);
    
            return true;
        }


content_main.xml

XML
<?xml version="1.0" encoding="utf-8"?>
    <android.support.constraint.ConstraintLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"
        tools:context="audiophileradio.example.com.audiophileradio.MainActivity"
        tools:showIn="@layout/app_bar_main"
        android:background="@drawable/backg1">
    
        <FrameLayout
            android:id="@+id/contentFrame"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            >
        </FrameLayout>
    
        <TextView
            android:id="@+id/textView3"
            android:layout_width="13dp"
            android:layout_height="21dp"
            android:layout_marginBottom="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginRight="8dp"
            android:layout_marginTop="8dp"
            android:text="+"
            android:textSize="18sp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintHorizontal_bias="0.977"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_bias="0.13"
            android:layout_marginStart="8dp"
            android:layout_marginEnd="8dp"/>


feedback.xml

XML
<?xml version="1.0" encoding="utf-8"?>
    <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
                                             xmlns:app="http://schemas.android.com/apk/res-auto"
                                             xmlns:tools="http://schemas.android.com/tools"
                                             android:layout_width="match_parent"
              android:layout_height="match_parent">

    <TextView
        android:id="@+id/textView4"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginTop="8dp"
        android:text="Title :"
        android:textSize="18sp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintHorizontal_bias="0.103"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.081"/>

    <EditText
        android:id="@+id/editText"
        android:layout_width="218dp"
        android:layout_height="35dp"
        android:ems="10"
        android:inputType="textPersonName"
        android:text="Name"
        app:layout_constraintBottom_toBottomOf="parent"
        android:layout_marginBottom="8dp"
        app:layout_constraintTop_toTopOf="parent"
        android:layout_marginTop="8dp"
        android:layout_marginLeft="8dp"
        app:layout_constraintLeft_toLeftOf="parent"
        android:layout_marginRight="8dp"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintHorizontal_bias="0.593"
        app:layout_constraintVertical_bias="0.084"
        android:background="@drawable/border"/>
</android.support.constraint.ConstraintLayout

SuggestionRe: Previous fragment visible under the new fragment issue Pin
David Crow8-May-17 6:53
David Crow8-May-17 6:53 
QuestionHelp Pin
Member 1302311825-Apr-17 14:06
Member 1302311825-Apr-17 14:06 
QuestionRe: Help Pin
Richard MacCutchan25-Apr-17 21:28
mveRichard MacCutchan25-Apr-17 21:28 
AnswerRe: Help Pin
Member 1302311826-Apr-17 0:22
Member 1302311826-Apr-17 0:22 
QuestionRe: Help Pin
David Crow26-Apr-17 3:00
David Crow26-Apr-17 3:00 
AnswerRe: Help Pin
Member 1302311826-Apr-17 3:27
Member 1302311826-Apr-17 3:27 
SuggestionRe: Help Pin
David Crow26-Apr-17 3:36
David Crow26-Apr-17 3:36 
GeneralRe: Help Pin
Member 1302311826-Apr-17 3:38
Member 1302311826-Apr-17 3:38 
GeneralRe: Help Pin
Richard MacCutchan26-Apr-17 21:07
mveRichard MacCutchan26-Apr-17 21:07 
Questionhow can i open a rar file with password Pin
Member 1298133419-Apr-17 3:05
Member 1298133419-Apr-17 3:05 
AnswerRe: how can i open a rar file with password Pin
Nick_314159265419-Apr-17 4:08
Nick_314159265419-Apr-17 4:08 
AnswerRe: how can i open a rar file with password Pin
CHill6019-Apr-17 4:10
mveCHill6019-Apr-17 4:10 
SuggestionRe: how can i open a rar file with password Pin
David Crow24-Apr-17 9:55
David Crow24-Apr-17 9:55 
QuestionTrying to set Imageview with background operations Pin
Gizem Alpaydin18-Apr-17 6:09
Gizem Alpaydin18-Apr-17 6:09 
QuestionI don't find the mistake I make Pin
User 1106097926-Mar-17 4:15
User 1106097926-Mar-17 4:15 
AnswerRe: I don't find the mistake I make Pin
Richard MacCutchan26-Mar-17 7:00
mveRichard MacCutchan26-Mar-17 7:00 
GeneralRe: I don't find the mistake I make Pin
User 1106097926-Mar-17 7:38
User 1106097926-Mar-17 7:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.