I have a strange problem. I am trying to change a text view but can't find view by id, it says that the findviewbyid cannot be resolved. I have a Main Activity from which I call an AsyncTask(Context context). In the constructor I pass THIS from main activity, I have already tried with Main Activity.get Context() but it still doesn't work.

Any help is welcome.

public class UcitavanjeUpozadini extends AsyncTask {

private Context context;
private ProgressDialog progressDialog;
private UcitavanjeHelperKlasa helperKlasa;
private List<OglasHelper> lista;

public UcitavanjeUpozadini(Context context){
    this.context = context;
    this.progressDialog = null;
    this.helperKlasa = new UcitavanjeHelperKlasa();
    this.lista = new ArrayList<OglasHelper>();

}

I'm using last version of crosswalk (v21), installed via cordova command line. Everything is working fine. My cookies are correctly set and took in account in the webview session.

However, when i exit the app, and re-run it, my session is lost, i have to re-login.

When i was using default cordova webview, my cordova app was correctly keeping my session, i could quit the cordova app, and rerun it, the session was still there.

How can i do the same with xwalk ? I'm on it since 2days, can't figure out what's wrong. It's very important to me to not force user to login at each app startup :(

Also, i absolutely need to keep crosswalk, else my app is "laggy", adding it on my app brings better user experience on UI (better performance, smooth interaction, better portability, ...).

Thanks for your help.

ps: my dev env is on android, i havent & cant test this on others platforms.

How to implement scroll and scroll bar in an android app? I am new to android development suggest some websites other than android developers website to quickly learn.

I have a activity with a fragment in it. User taps on one item in a recyclerview and opens the secon activity (a fragment too). The second activity has a back button in the toolbar. When the user taps the "Back" Key on the devices bottom, it goes back to the first activity and restores the position from the items with

prefs.getInt("position", position);
if (position < 0) {
    ((LinearLayoutManager) recyclerView.getLayoutManager()).scrollToPosition(position);
}

Which is set in my onResponse Method (JSON Parsing with Retrofit). That works. But if the user taps the back button in the toolbar, it goes back to the first activity but reloads all the code an ignores the position setting.

How can I achieve the same effect the back button on the device with the button in the toolbar?

I have a tab layout and a view pager. The tab layout always starts with a single tab, however, I want to be able to dynamically add and remove new tabs via buttons.

In onCreate:

mViewPager  = (ViewPager)   view.findViewById(R.id.viewpager);
mToolbar    = (Toolbar)     view.findViewById(R.id.toolbar);
mTabLayout  = (TabLayout)   view.findViewById(R.id.tabs);

setupViewPager(mViewPager);
mTabLayout.setupWithViewPager(mViewPager);

The setupViewPager method:

private void setupViewPager(ViewPager viewPager) {
    mAdapter = new ViewPagerAdapter(getActivity().getSupportFragmentManager());
    mAdapter.addFragment(new CycleFragment(), "TEST TAB");
    viewPager.setAdapter(mAdapter);
}

The viewPageAdapter class:

class ViewPagerAdapter extends FragmentPagerAdapter {
    private final List<Fragment> mFragmentList = new ArrayList<>();
    private final List<String> mFragmentTitleList = new ArrayList<>();

    public ViewPagerAdapter(FragmentManager manager) {
        super(manager);
    }

    @Override
    public Fragment getItem(int position) {
        return mFragmentList.get(position);
    }

    @Override
    public int getCount() {
        return mFragmentList.size();
    }

    public void addFragment(Fragment fragment, String title) {
        mFragmentList.add(fragment);
        mFragmentTitleList.add(title);
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mFragmentTitleList.get(position);
    }
}

Is it possible to dynamically add and remove fragments to/from the viewpager? I understand via this method, adding new fragments is relatively simple. However, how would I remove fragments?

I'm working on mobile test automation. Basically I'm trying to select a new date in the android emulator using APPIUM with Eclipse (HELIOS) with JAVA. The class name for the time picker is:

android.widget.RadialTimePickerView$RadialPickerTouchHelper

As you can there is dollar sign($). If I use the following syntax.

List timeButtons = driver.findElements(By.xpath("//android.widget.RadialTimePickerView$RadialPickerTouchHelper"));

I get an error message invalid XPATH/CSS selector.

This question already has an answer here:

I have created a password UITextField on my Swift 3.0 project checking the option Secure Text Entry.

enter image description here

and it works almost well (at least almost I want it to work). I would like to hide the password always and not to get a preview of the last character of the password. It is only during few seconds but I would like to remove it.

Here I add a screenshot of what I mean:

enter image description here

Is it possible to hide the entirely password UITextField while you are writing the password?

Thanks in advance!

I've noticed a change in the way bar tint color animates in ios 10. I've created a sample project outlining the change: Github: ios10BarTintDemo

Basically on ios 9 the barTintColor animates smoothly using [UIViewControllerTransitionCoordinator animateAlongsideTransition]

but on ios 10 the animations are much less smooth and when popping a view controller doesn't animate at all, I've tried adding [self.navigationController.navigationBar layoutIfNeeded] as mentioned in some similar answers but this doesn't seem to have any effect when pushing/popping controllers.

I have a FRAGMENT with a viewpager with 7 other fragments. These fragments are used to enter user details. In the final fragment, there is a "submit" button where I need to get all the user details entered in the other fragments. How can I do this

I saw this question which didnt help. So please dont mark this question duplicate.

The base fragment:

public class Register_Layout extends Fragment implements ViewPager.OnPageChangeListener{
public Register_Layout(){}

static ViewPager viewPager1;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_register_layout,  container, false);

    viewPager1 = (ViewPager) view.findViewById(R.id.view_pager1);
    viewPager1.setOffscreenPageLimit(7);
    FragmentManager fragmentManager =  getActivity().getSupportFragmentManager();
    viewPager1.setAdapter(new MyAdapter(fragmentManager));

    return view;
}

@Override
public void onPageScrolled(int position, float positionOffset, int    positionOffsetPixels) {

}

@Override
public void onPageSelected(int position) {

}

@Override
public void onPageScrollStateChanged(int state) {

}

}

class MyAdapter extends FragmentPagerAdapter{

public MyAdapter(FragmentManager fm) {
    super(fm);
}

@Override
public Fragment getItem(int position) {
    Fragment fragment = null;
    if(position==0)
    {
        fragment = new Register();
    }

    if(position==1)
    {
        fragment = new Register_Page2();
    }

    if(position==2)
    {
        fragment = new Register_Page3();
    }

    if(position==3)
    {
        fragment = new Register_Page4();
    }

    if(position==4)
    {
        fragment = new Register_Page5();
    }

    if(position==5)
    {
        fragment = new Register_Page6();
    }

    if(position==6)
    {
        fragment = new Register_Page7();
    }
    return fragment;
}

@Override
public int getCount() {
    return 7;
}
}

The final fragment where I should get data of all other fragments:

public class Register_Page7 extends Fragment {
public Register_Page7(){

}

EditText editText;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_register_page7, container, false);

    Button Previous = (Button) view.findViewById(R.id.Previous7);
    Button Regiter = (Button) view.findViewById(R.id.Submit);
    Regiter.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getActivity());
            alertDialogBuilder.setMessage("Are you sure you want to submit?");

            alertDialogBuilder.setPositiveButton("Yes",new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface arg0, int arg1) {

                }
            });
            alertDialogBuilder.setNegativeButton("No,Let me check the details again", new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialogInterface, int i) {

                }
            });

            AlertDialog alertDialog = alertDialogBuilder.create();
            alertDialog.show();
        }
    });

    Previous.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            new Register_Layout().viewPager1.setCurrentItem(5);

        }
    });
    return view;
  }
 }

I have added the iOS RTC plugin then if I open the project in xcode and run it in device its not showing apprtc.appspot.com.

It shows

Apache Cordova "Device is ready"

Here is the github repo link

This question is somewhat related with this one

I am confused someone kindly guide me !

I noticed a strange behaviour with UITextView.

I logged it's height in textViewDidChange, and found that it's height stays the same unless there are two or more characters on a new line. This is giving me some serious issues. Anyone knows a fix?

Using [textView sizeThatFits:textView.frame.size] returns the correct size as soon as a new line is created.

I am using autolayout and my UITextView is embedded in a UITableViewCell

I m trying to change the app balance through cheatdroid app but after editing the (float) it doesn't change .it change but for few seconds .so how to change it permanently.

Using AVPlayer in Swift. No error but no sound playing on iPhone.

I'm new to Swift. I will appreciate a response.

Here is my code:

import UIKit
import AVFoundation

class PlayerViewController: UIViewController {
    // This time, we'll declare avPlayer as an instance variable,
    // which means it exists as long as our view controller exists.
    var avPlayer: AVPlayer!

    override func viewDidLoad() {
        super.viewDidLoad()

        print("Connecting...")

        // If you'd rather not use this sound file,
        // replace the string below with the URL of some other MP3.
        let urlString = "http://live.canstream.co.uk:8000/bangradio.mp3"
        let url = NSURL(string: urlString)!
        avPlayer = AVPlayer(URL: url)

        print("Connected to One Radio!")
        avPlayer.play()
        print("Now playing...")
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
}

I used this code in swift 2.3 to change the foreground color of status bar:

(application.value(forKey: "statusBar") as AnyObject).setValue(UIColor.red, forKey: "foregroundColor")

But in the update to swift 3.0 this part not work because the statusbar no have the foreground key.

Someone has been able to change the color of statusbar in swift 3.0 ?

Thank you.

Anyone have any idea how to do something like this ? http://i.stack.imgur.com/G18c9.png

Following problem: In a project with several targets (schemes) occur from time to time wrong configs. They won't be recognized by Xcode, so I wrote a swift script to check them. The path s given by command line parameter. Now I need to integrate this script into Xcode, so it's run everytime I compile one of the targets.

My idea was to use the run script. But there are 2 problems. 1. How do I get the path? The path can be "calculated" if the target/scheme name is known. 2. How do a raise an exception in Xcode, so it stops building when there is an error and shows my error?

It would be a dream if you answer my questions. Other solutions are also welcome.

Thank you very much for reading and helping!

This is a mystery to me and I hope you can help me out...

I have made an app that has got a QR-scanner and when accessing it on a fresh install on my iphone an alert is shown subsequently. The problem is that the camera image freezes up and I am unable to scan any QR-codes...

This problem goes away once I run the application from xcode again...

This is what's printed out in the console:

_BSMachError: port 13403; (os/kern) invalid capability (0x14) "Unable to insert COPY_SEND"

Note that I have added NSCameraUsageDescription to Info.plist.

In android studios when I import an Action Bar and Tab icon, the image opacity changes. Is there a way to prevent this or undue it?

i used the AVCaptureMetadataOutputObjectsDelegate for a barcode scanner and it worked perfect. But since ios 10 it does not working anymore. I always get a EXC_BAD_ACCESS error when I open the barcodescanner with it´s button. The error occurs when i add an output to the session. Can someone help me please? I really tried everything and it drives me crazy.

enter image description here

I want to know the exact meaning of the above blue box.

I thought that 'Delivered' indicates the items that are required to submit to client.

And 'Date' means...... a deadline?

There are some features in C# that are either outdated or poorly designed from the beginning. Some examples:

C# or .Net features to cut off assuming no backward compatibility needed?

http://www.informit.com/articles/article.aspx?p=2425867

https://wiki.theory.org/YourLanguageSucks#C.23_sucks_because

These features and constructs are still in the language mainly (only) because of backward compatibility reasons. But it seems to me that as newer features are added, the language becomes more complex, which makes it harder to learn (which features should I avoid?). It probably also makes it harder to add new features.

I think it would make sense to deprecate these old features and clean up a bit of cruft, even if it breaks backward compatibility.

To keep it constructive: the question is whether there are any plans to do so, or if the design team thinks backward compatibility is so important that it's worth having a worse language than what could have been? I'm looking for insight from current or former members of the C# and/or CLR design teams, or from anyone with such connections.