你好,我的一个应用程序,我需要获取fb的数据......我正在这样做..
我已经创建了它成功登录的应用程序ID但在注销后我登录然后它给了我

我在做什么错了?请建议我使用Facebook sdk ...我已经在我的手机中安装了Facebook ...这在运行良好的模拟器中没有安装内置的Facebook应用程序
这是我的代码
if (FB_APP_ID == null) {
Builder alertBuilder = new Builder(this);
alertBuilder.setTitle("Warning");
alertBuilder.setMessage("A Facebook Applicaton ID must be " +
"specified before running this example: see App.java");
alertBuilder.create().show();
}
// Initialize the dispatcher
Dispatcher dispatcher = new Dispatcher(this);
dispatcher.addHandler("login", LoginHandler.class);
dispatcher.addHandler("stream", StreamHandler.class);
dispatcher.addHandler("logout", LogoutHandler.class);
// If a session already exists, render the stream page
// immediately. Otherwise, render the login page.
Session session = Session.restore(this);
if (session != null) {
dispatcher.runHandler("stream"); …Run Code Online (Sandbox Code Playgroud) 有什么区别
setContentView(R.layout.main);
Run Code Online (Sandbox Code Playgroud)
和
ArrayAdapter arrayAdapter = new ArrayAdapter(this,
android.R.layout.simple_spinner_dropdown_item, sarray);
Run Code Online (Sandbox Code Playgroud)
R.layout和之间有什么区别android.R.layout?
这很奇怪,但如果你在一个TextView(或不可编辑的EditText) 上放一个onClickListener,android:textIsSelectable="true"它不需要一次点击,而是两次.我在3部手机上检查了它,所有这些都只在第二次点击后执行onClick.
当然,如果您在第一次点击时制作focusable="false"或android:textIsSelectable="false"工作,但文字选择不起作用.
请帮我解决这个问题
我需要创建像滚动TextView内部ScrollView..像1主要ScrollView内部可滚动TextView我已经把这个代码RelativeLayout
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_below="@+id/img_view_flag"
android:layout_marginTop="17dp"
android:paddingBottom="20dip">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/tv_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/rel_layout"
android:layout_marginTop="15dp"
android:maxLines="7"
android:scrollbars="vertical"
android:text="Medium Text"
android:paddingBottom="10dip"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/black" />
<RelativeLayout
android:id="@+id/rel_layout2"
android:layout_width="match_parent"
android:layout_height="4dp"
android:layout_alignParentLeft="true"
android:layout_below="@+id/tv_desc"
android:background="@color/black" >
</RelativeLayout>
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/rel_layout2"
android:layout_marginTop="24dp"
android:maxLines="5"
android:scrollbars="vertical"
android:text="Small Text"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/black" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/rel_layout2"
android:layout_centerHorizontal="true"
android:text="Title"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/black" />
<RelativeLayout
android:id="@+id/rel_layout3"
android:layout_width="match_parent"
android:layout_height="4dp"
android:layout_alignParentLeft="true"
android:layout_below="@+id/tv_title"
android:background="@color/black" >
</RelativeLayout> …Run Code Online (Sandbox Code Playgroud) 我想创建一个Android应用程序,它是Internet广播站的客户端.我希望它看起来像Android本机?但我与Android API逻辑和文档混淆.我得到的是我需要MediaPlayer和MediaController类.我是对的,有没有关于Android的AUDIO播放器的好例子?
特别是,我对如何使用MediaPlayer和MediaController课程非常感兴趣.
UPD:
最后我得到了代码,它完全符合我的要求:
Intent i = new Intent(Intent.ACTION_VIEW);
Uri u = Uri.parse(%file_uri%));
i.setData(u);
startActivity(i);
Run Code Online (Sandbox Code Playgroud) 我所做的应用程序没有选择移动到SD卡...
在我的设置页面中,我没有选择将应用程序移动到SD卡,但其他应用程序有它.为什么会那样?我在做什么错了?

我的应用程序看起来像这样

我需要像今天、昨天、2 天前那样打印日期,因为我已经完成了我得到的日期就像:String date1 = "Thu Nov 13 19:01:25 GMT+05:30 2014";
打电话str=get_userTime(date1);
private String get_userTime(String usertime) {
Date d = null;
// String datee = "Thu Nov 13 19:01:25 GMT+05:30 2014";
String datee = usertime;
SimpleDateFormat inputFormat = new SimpleDateFormat(
"EE MMM dd HH:mm:ss zz yyy");
try {
d = inputFormat.parse(datee);
} catch (java.text.ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
SimpleDateFormat outputFormat1 = new SimpleDateFormat("MM/dd/yyyy");
System.out.println(outputFormat1.format(d));
op = outputFormat1.format(d);
op=formatToYesterdayOrToday(op);
return op;
}
Run Code Online (Sandbox Code Playgroud)
这是昨天/今天获得的另一个功能,我使用了这个链接
public …Run Code Online (Sandbox Code Playgroud) 我想将图像保存到我的本地驱动器文件夹或res/drawable我的应用程序中的文件夹.我现在正在将img保存到SD卡中,但我要将它保存在res/drawable文件夹中.我的代码是:
String image_URL = "http://chart.apis.google.com/chart?chs=200x200&cht=qr&chl=http%3A%2F%2Fandroid-er.blogspot.com%2F";
String extStorageDirectory;
Bitmap bm;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button buttonSave = (Button) findViewById(R.id.save);
ImageView bmImage = (ImageView) findViewById(R.id.image);
BitmapFactory.Options bmOptions;
bmOptions = new BitmapFactory.Options();
bmOptions.inSampleSize = 1;
bm = LoadImage(image_URL, bmOptions);
bmImage.setImageBitmap(bm);
extStorageDirectory = Environment.getExternalStorageState().toString();
extStorageDirectory = Environment.getExternalStorageDirectory()
.toString();
buttonSave.setText("Save to " + extStorageDirectory + "/qr.PNG");
buttonSave.setOnClickListener(buttonSaveOnClickListener);
}
private Bitmap LoadImage(String URL, BitmapFactory.Options options) {
Bitmap bitmap = null;
InputStream …Run Code Online (Sandbox Code Playgroud) 我有t1桌子no number(3)和name varchar2(20)列
而emp其表empno,ename,job等列.
现在我创造了一个观点
create view v_t as select * from t1,emp;
Run Code Online (Sandbox Code Playgroud)
它创造了视图.然后我试图在v_t视图中插入值,但它给了我错误
无法修改映射到非密钥保留表的列
我究竟做错了什么?