bashgid/android/src/fishrungames/bashgid/SettingsFragment.java
2015-07-05 11:03:52 +00:00

80 lines
2.1 KiB
Java

package fishrungames.bashgid;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
public class SettingsFragment extends Fragment
{
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
View rootView = inflater.inflate(R.layout.fragment_settings_page, container, false);
Button callSupportButton = (Button) rootView.findViewById(R.id.callSupportButton);
callSupportButton.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View v)
{
String uri = "tel:+79260492730";
Intent intent = new Intent(Intent.ACTION_DIAL);
intent.setData(Uri.parse(uri));
MainActivity.getInstance().startActivity(intent);
}
});
Button visitKitapButton = (Button) rootView.findViewById(R.id.visitKitapButton);
visitKitapButton.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View v)
{
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse("http://kitap-ufa.ru/"));
startActivity(i);
}
});
Button visitDeveloperButton = (Button) rootView.findViewById(R.id.visitDeveloperButton);
visitDeveloperButton.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View v)
{
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse("http://fishrungames.ru/"));
startActivity(i);
}
});
Button visitTranslatorButton = (Button) rootView.findViewById(R.id.visitTranslatorButton);
visitTranslatorButton.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View v)
{
String link = getResources().getString(R.string.littlefoxlilia_link);
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(link));
startActivity(i);
}
});
return rootView;
}
}